A day after selling his stake in a St. Paul tech startup, Sean Higgins had no office to go to and nothing pressing to do. But he couldn’t stop reaching for his smartphone to check e-mail.

He noticed what he was doing and started counting how many times he glanced at e-mail. At 30, he realized he had a problem and that it might be an opportunity.

“That got me thinking about how I use the device. Am I using it the way I intended?” Higgins said.

Several months and countless more phone fidgets later, Higgins and his friend Edwin Melendez started a company with an idea for arresting the distractive qualities of smartphones and other digital gadgets.

Called BetterTime Co. and based in a co-working space in St. Paul, the company in less than a year has grown to four people and put together an app-based product that has attracted 12 corporate and institutional clients and hundreds more individual users.

The app is called BetterYou and works on Apple and Android devices, including smartwatches. A user programs the app with goals, such as targets for sleeping, fitness, social interactions and meditation.

Unlike most other health and wellness apps, such as exercise trackers, BetterYou senses from the movement of the phone or smartwatch how its user is progressing through the day toward reaching goals. It then adjusts its “nudges,” or recommendations, to suit the user better.

“My phone knows if I called my mom this week, or if I was on Netflix at 1 or 2 in the morning when I probably should have been in bed,” Higgins said.

The nudge takes the form of a notification message that shows up on top of whatever is happening on the smartphone, tablet or watch. For instance, Higgins said, a person who has set a goal of seven hours of sleep but is fiddling around in bed looking at e-mail or Instagram will get a nudge to turn off the device.

“Our app can come up over the top and say ‘Hey Sean, you said one of your goals was more sleep, could this wait?’ ” he said. “It brings me back to what I said in my goals. The device has these clues. Sean is at home. Sean said he wanted to sleep some more. It’s 1 a.m. One of these things does not add up. We’re there to help course-correct.”

As awareness and concern about gadget overuse began to build, both Apple and Google made changes last year to their market-dominating operating systems to get people to cut back their screen time. Both added dashboards that show individuals how they are spending time on gadgets, some with detailed by-the-minute views of app usage. They also added features that let parents see how often children and teens are using gadgets.

Higgins saw an opportunity to go further, reaching people who are driven to make better use of their time generally.

“There are wellness-focused people who are going to run a marathon this month. Our app is not for them,” he said. “Our person is someone who is time-poor. They’ve got a job, they’re in class, they’ve got a family. They’ve got all these balls in the air and they’re sick of dropping the wrong ones. For them, we provide an opportunity to help move their lives forward without adding another thing to do.”

Higgins hired Tommy Khoo, a data scientist from Singapore, to improve the app and its back-end system to be able to analyze regular patterns and adjust to user habits. Khoo accepted the job after visiting the Twin Cities for the first time last fall at the invitation of the creators of Twin Cities Startup Week.

Higgins had one more insight to help distinguish the BetterYou app. He realized many businesses are eager to help smooth out the work-life balance of their employees, and many colleges and universities want to help students lower stress and improve academic performance. Higgins and marketing chief Risa Piper began reaching out to those businesses to sell the product, along with insights gleaned from users affiliated with them.

Administrators at colleges, for instance, know that midterms and finals are stressful periods for students. They set up programs during those weeks to relieve stress. But some of the colleges who are early users of BetterYou discovered that behavior patterns in students change two weeks ahead those test periods, suggesting they should begin such outreach efforts earlier.

BetterTime doesn’t share individual data with colleges or employers, Higgins said. Instead, those firms and institutions get population-level information that provides insights.

“It’s looking at when things move in the same direction,” he said. “If social connections drop, if sleep drops, if physical workouts drop, those are indicators that it’s a pretty stressful time.”

Higgins, who is 28, raised $400,000 to get BetterTime off the ground, using both his own money and outside capital. He’s working on closing another round of investment soon.