Captain Dondo
10-02-2006, 02:09 PM
I came across a little bit of C code that uses a T4 timer.... From
googling about, I've found that there are (or may be) t1, t2, t3, t4 timers.
Are these more-or-less standard? Where can I find out about them?
From looking at the code, it looks as though the timer uses 40 bits and
runs quite fast. The 40 bits are stored as one unsigned long for the
low-order bits and th elower 8 bits of second unsigned long for the
high-order 8 bits.
I'm really interested in the time difference between two events, so I'd
like to use this timer, but given that it seems to run quite fast, and
that my uptime may be measured in months or possibly years, I need to
handle timer rollover.
Any suggestions on handling rollover with a 40 bit timer? I'm not as
familiar with handling this kind of logic as I should be....
TIA,
--Yan
googling about, I've found that there are (or may be) t1, t2, t3, t4 timers.
Are these more-or-less standard? Where can I find out about them?
From looking at the code, it looks as though the timer uses 40 bits and
runs quite fast. The 40 bits are stored as one unsigned long for the
low-order bits and th elower 8 bits of second unsigned long for the
high-order 8 bits.
I'm really interested in the time difference between two events, so I'd
like to use this timer, but given that it seems to run quite fast, and
that my uptime may be measured in months or possibly years, I need to
handle timer rollover.
Any suggestions on handling rollover with a 40 bit timer? I'm not as
familiar with handling this kind of logic as I should be....
TIA,
--Yan