[vala] linux: add adjtime(2) and adjtimex(2) with assorted flags and constants
- From: Michael Lauer <mlauer src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] linux: add adjtime(2) and adjtimex(2) with assorted flags and constants
- Date: Sun, 22 Nov 2009 23:01:32 +0000 (UTC)
commit d39dab535d6c9b3cca3022d933c1afe976690e7c
Author: Michael 'Mickey' Lauer <mickey vanille-media de>
Date: Mon Nov 23 00:00:14 2009 +0100
linux: add adjtime(2) and adjtimex(2) with assorted flags and constants
vapi/linux.vapi | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index dd06567..caa2185 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -154,6 +154,54 @@ namespace Linux {
[CCode (cheader_filename = "sched.h")]
public int unshare (CloneFlags flags);
+ [CCode (cheader_filename = "sys/time.h")]
+ public int adjtime (Posix.timeval delta, Posix.timeval? olddelta = null);
+
+ // adjtimex(2)
+ [CCode (cprefix = "ADJ_", cheader_filename = "sys/timex.h")]
+ public enum AdjustModes {
+ OFFSET,
+ FREQUENCY,
+ MAXERROR,
+ ESTERROR,
+ STATUS,
+ TIMECONST,
+ TICK,
+ OFFSET_SINGLESHOT
+ }
+
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_OK;
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_INS;
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_DEL;
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_OOP;
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_WAIT;
+ [CCode (cheader_filename = "sys/timex.h")]
+ public const int TIME_BAD;
+
+ // adjtimex(2)
+ [CCode (cname = "struct timex", cheader_filename = "sys/timex.h")]
+ public struct timex {
+ public AdjustModes modes; /* mode selector */
+ public long offset; /* time offset (usec) */
+ public long freq; /* frequency offset (scaled ppm) */
+ public long maxerror; /* maximum error (usec) */
+ public long esterror; /* estimated error (usec) */
+ public int status; /* clock command/status */
+ public long constant; /* pll time constant */
+ public long precision; /* clock precision (usec) (read-only) */
+ public long tolerance; /* clock frequency tolerance (ppm) (read-only) */
+ public Posix.timeval time; /* current time (read-only) */
+ public long tick; /* usecs between clock ticks */
+ }
+
+ [CCode (cheader_filename = "sys/timex.h")]
+ public int adjtimex (Linux.timex buf);
+
[CCode (cheader_filename = "time.h")]
public time_t timegm (GLib.Time t);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]