Add support for ADJ_OFFSET_SS_READ mode

Also assume that kernels >= 2.6.27 don't need frequency scaling.
This commit is contained in:
Miroslav Lichvar
2009-05-20 17:43:09 +02:00
parent 75330fdff5
commit 032d1db883
4 changed files with 39 additions and 10 deletions

View File

@@ -93,7 +93,7 @@ TMX_GetFrequency(double *freq)
}
int
TMX_GetOffsetLeft(long *offset)
TMX_GetOffsetLeftOld(long *offset)
{
struct timex txc;
int result;
@@ -103,6 +103,17 @@ TMX_GetOffsetLeft(long *offset)
return result;
}
int
TMX_GetOffsetLeft(long *offset)
{
struct timex txc;
int result;
txc.modes = ADJ_OFFSET_SS_READ;
result = adjtimex(&txc);
*offset = txc.offset;
return result;
}
int
TMX_ReadCurrentParams(struct tmx_params *params)
{