The first thing any professional cyclist thinks upon crashing is, “How long am I out?” (Well, right after thinking choice words not fit for print.) The answer might be 30 seconds; you disentangle from the bike, assess physical and equipment damage, and if everything checks out, jump back on and chase after the race.

Those are the lucky accidents. For the bigger crashes, the time is measured in days, weeks, or sometimes months. Those are the unfortunate ones; not only are you dealing with ongoing pain, struggle, and the slow process of recovery, but you’re watching the rest of the world keep training and racing while you’re on the sidelines fretting over lost fitness.

On May 13, I had one of the unlucky crashes. It was the second stage of the Amgen Tour of California Women’s WorldTour race and we were 80 kilometers into the race. To be honest, I’d had a crap day on the bike; huge efforts from the previous stage had put me in the red too many times and I’d rolled off the start line tired and apprehensive about the big climbs ahead. I’d already struggled up the first mountain but managed to get back into good position in the field in preparation for the stage’s final massive climb. The field was rolling steadily along when my teammate came over our race radios to say she wanted to drop her jacket in the team car. Wanting to be helpful, I offered to do it for her and started to filter back through the peloton while looking around to find her.

I’ve looked behind me a thousand times while riding. Checked for cars, checked to see if a lane was open, checked to see if somebody was on my wheel. I do core exercises every day to work the muscles that are used to stabilize the body when doing this very same movement. 99 times out of 100, I can look behind me while riding a straight line. But this time I screwed up; swerved slightly sideways while looking behind, clipped somebody’s rear wheel, and lost control. I flew backwards off the bike and crashed down on my side, slamming my head, right elbow, and hip into the ground.

“How long am I out?” I knew my race was over from the searing pain in my head. Concussions are a nonstarter in bike racing. It took another minute to realize something in my shoulder didn’t feel right and another moment after that to guess it was a fractured collarbone. That meant a recovery period at least measured in weeks. It was crushing to realize; it was the peak of my season and my form was just coming together. Time off could mean a devastating blow to the season’s goals.

The next 48 hours were a blur of pain, drugs, doctors, and travel. I was transported to the hospital, admitted for the night, and sent into surgery to set my shattered collarbone with a plate and screws. Then I was released, taken back to the race hotel to gather my things, and flown home to recover. There may not be a bucket large enough to hold all of the tears shed as I grappled with the pain, stress, and disappointment that weekend. The whole time I kept asking doctors, nurses, my coaches, and my boyfriend about when I could get back on the bike. People looked at me like I was crazy. The surgeon said six weeks.

It was five days after the crash and four days after the surgery that I decided it was time to start riding again. Too soon? Probably. But for any athlete, the mental stress of forced time off is almost as agonizing as the injury itself. My right arm was nearly useless and my concussion left me moody and foggy, but I needed to start spinning my legs.

My boyfriend set up my CycleOps trainer on our apartment balcony and stacked a box and several folded towels under the front wheel to get as much lift as possible to keep weight off my arms. I couldn’t wear a sports bra or pull up my bibs – it was too much pressure and chafing on my surgery wound and aching clavicle – so I settled on a tank top and dangling bib straps. Pulling my long hair into a ponytail was impossible, so I left it hanging. My arm sling was almost immediately drenched in sweat. Everything felt terrible and off balance and awkward as I started riding, but I was finally pedaling again and that felt nearly perfect. I lasted 45 minutes.

Each ride got a bit easier after that. I was able to start wearing a sports bra. My hair made it into some semblance of a ponytail. I ditched the sling and, a few days later, I could touch the bars. Then I could actually use them. I was able to switch out my pile of debris under the front wheel for a simple CycleOps trainer block and it didn’t hurt to sit at that lower angle. I started adding intensity back into my workouts little by little, until I began to feel like myself again. My head and collarbone were slow to be ready for outside riding, but I was able to log enough workouts on the trainer to nearly avoid any loss of fitness.

Admittedly, it is not fun riding the trainer in the summer when group rides are in full swing and everybody is racing. I can suffer all winter long indoors but it’s because the promise of a rich season of riding lies ahead; interrupting that season for more stationary workouts was frustrating and crushingly hard at times. But I knew that each workout completed was one more day of holding onto my fitness and rejoining the race season as ready as possible.

Four weeks to the day of my crash, I lined up in Arlington, VA to start the Armed Forces Cycling Classic race. I was nervous about the risk of crashing again on my barely healed collarbone and head, but felt ready to get back to racing. Just a few laps into the 50-lap event, my accident was a distant memory: thanks to my CycleOps trainer, I was able to ride strong and race hard despite having been through something that should have cost a lot more time and fitness. It felt great to be back racing with the team, and my efforts that day were rewarded with the Most Courageous Rider’s Jersey from the race judges.

While I don’t advise anyone to carve a chunk out of their season to recover from a nasty injury, it’s an inevitable part of cycling. If you find yourself on the unlucky end of a crash, don’t give up hope. Even if it’s a long time before you’re ready to be back on the road, often you can get going indoors much sooner to get a jump on your fitness. Sure, the trainer isn’t as fun as a race or a group ride or an adventure on beautiful roads, but it’s an invaluable way to make sure you’re as ready as possible when you get back out there.