Dr. Wood, author of the book, “Good Habits, Bad Habits: The Science of Making Positive Changes That Stick,” calls the forces that get in the way of good habits “friction.”
In one study, researchers changed the timing of elevator doors so that workers had to wait nearly half a minute for the doors to close. (Normally the doors closed after 10 seconds.)
It was just enough of a delay that it convinced many people that taking the stairs was easier than waiting for the elevator.
“It shows how sensitive we are to small friction in our environment,” said Dr. Wood. “Just slowing down the elevator got people to take the stairs, and they stuck with it even after the elevator went back to normal timing.”
(Link)
Also, the article mentioned it takes 66 days in average for one to build a habit (if the action is being done every day.)