Don't reset kernel frequency on start without drift file

This commit is contained in:
Miroslav Lichvar
2011-06-14 21:03:16 +02:00
parent a5f63180fc
commit 2b7e4d645f
4 changed files with 26 additions and 15 deletions

View File

@@ -86,13 +86,14 @@ TMX_SetFrequency(double *freq, long tick)
}
int
TMX_GetFrequency(double *freq)
TMX_GetFrequency(double *freq, long *tick)
{
struct timex txc;
int result;
txc.modes = 0; /* pure read */
result = adjtimex(&txc);
*freq = txc.freq / (double)(1 << SHIFT_USEC);
*tick = txc.tick;
return result;
}