R
Ram
Hi,
I am looking for functions in 'C' to convert the struct timeval
into double,
add milliseconds to struct timeval.
Does anybody know how to do it.
What is the effect of "time drift" in time in linux. How can this be
taken care of ?.
Scenario ( )
{
StartTime = gettimeofday ( ) ;
PlayTime = StartTime + 2millseconds ;
while (1) {
Do Some Work ;
Now = gettimeofday ( ) ;
If (Now == PlayTime)
Play ( ) ;
PlayTime = Now + 2milliseconds ;
}
}
I Think Now and PlayTime will never be equal. I call this drift.
How does one take care ?.
Please Advice.
Any Pointers ?
Regards,
Ram
I am looking for functions in 'C' to convert the struct timeval
into double,
add milliseconds to struct timeval.
Does anybody know how to do it.
What is the effect of "time drift" in time in linux. How can this be
taken care of ?.
Scenario ( )
{
StartTime = gettimeofday ( ) ;
PlayTime = StartTime + 2millseconds ;
while (1) {
Do Some Work ;
Now = gettimeofday ( ) ;
If (Now == PlayTime)
Play ( ) ;
PlayTime = Now + 2milliseconds ;
}
}
I Think Now and PlayTime will never be equal. I call this drift.
How does one take care ?.
Please Advice.
Any Pointers ?
Regards,
Ram