A San Francisco man went to extremes to keep himself on task in the office.

Maneesh Sethi wrote on his blog that he hired a "slapper" to smack him in the face whenever he logged onto Facebook while working and boasted that it increased his productivity by four times, Yahoo! reported.

Using an app called RescueTime, which measures how much time you spend on websites, Sethi found that he spent approximately 29 hours on Reddit and Facebook chat during the week.

He posted an ad on Craigslist looking for a slapper, offering to pay $8 an hour.

His inbox was flooded with 20 emails in less than an hour. Sethi eventually settled on a woman named Kara, and the two met at a local cafe the next morning.

In his blog post, he wrote that it wasn't "the fear of the slap" that drove his productivity, but the fact that someone was there to encourage him to focus and help him brainstorm.

"Kara became my makeshift boss, knowing what I needed to get done, and forcing me to do it," Sethi wrote.