mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 20:55:07 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a7cf6a5ce | ||
|
|
c2f83bd8a4 |
7
NEWS
7
NEWS
@@ -1,3 +1,10 @@
|
|||||||
|
New in version 2.1.1
|
||||||
|
====================
|
||||||
|
|
||||||
|
Bug fixes
|
||||||
|
---------
|
||||||
|
* Fix clock stepping by integer number of seconds on Linux
|
||||||
|
|
||||||
New in version 2.1
|
New in version 2.1
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|||||||
@@ -193,12 +193,12 @@ TMX_ApplyStepOffset(double offset)
|
|||||||
struct timex txc;
|
struct timex txc;
|
||||||
|
|
||||||
txc.modes = ADJ_SETOFFSET | ADJ_NANO;
|
txc.modes = ADJ_SETOFFSET | ADJ_NANO;
|
||||||
if (offset >= 0) {
|
txc.time.tv_sec = offset;
|
||||||
txc.time.tv_sec = offset;
|
|
||||||
} else {
|
|
||||||
txc.time.tv_sec = offset - 1;
|
|
||||||
}
|
|
||||||
txc.time.tv_usec = 1.0e9 * (offset - txc.time.tv_sec);
|
txc.time.tv_usec = 1.0e9 * (offset - txc.time.tv_sec);
|
||||||
|
if (txc.time.tv_usec < 0) {
|
||||||
|
txc.time.tv_sec--;
|
||||||
|
txc.time.tv_usec += 1000000000;
|
||||||
|
}
|
||||||
|
|
||||||
return adjtimex(&txc);
|
return adjtimex(&txc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user