> Many thanks Col,
>
No problem.
Actually we need another atomic block.
eg:
ATOMIC_BLOCK( ATOMIC_FORCEON )
{
temp = count4ms;
}
if ( temp >= 305 )
{
ATOMIC_BLOCK( ATOMIC_FORCEON )
{
count4ms=0;
}
seconds++;
I did this as two separate atomic blocks to keep them as short as possible.
Cheers
Col.