Thread: System time
View Single Post
  #2   Spotlight this post!  
Unread 20-01-2006, 22:48
Jared Russell's Avatar
Jared Russell Jared Russell is online now
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,077
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: System time

Use a 32 bit timer :-)

In other words, when your 16 bit timer gets to big, add it to a 32 bit variable and reset it.

If 16 bits overflows in 26.6ms, 17 bits will overflow in 53.2ms, and so on.

32 bits shouldn't overflow for 29 minutes.