summaryrefslogtreecommitdiff
path: root/slack-timedate.h
diff options
context:
space:
mode:
Diffstat (limited to 'slack-timedate.h')
-rw-r--r--slack-timedate.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/slack-timedate.h b/slack-timedate.h
index c990013..49f0209 100644
--- a/slack-timedate.h
+++ b/slack-timedate.h
@@ -17,6 +17,7 @@
*/
#include <dbus/dbus.h>
+#include <gio/gio.h>
#define BUS_NAME "org.freedesktop.timedate1"
#define BUS_PATH "/org/freedesktop/timedate1"
@@ -50,7 +51,9 @@
"</node>\n"
#define DEFAULT_EXIT_SEC 300
-#define USEC_PER_SEC 1000000ULL
+
+constexpr gint32 USEC_PER_SEC = 1000000ULL;
+constexpr gint32 NSEC_PER_USEC = 1000ULL;
// Returns the system time zone
gchar *slack_get_timezone ();
@@ -62,8 +65,7 @@ gboolean slack_set_timezone (gchar *);
// Changes the date/time
// Takes the amount of seconds since UNIX epoche and
// Returns true on success, false otherwise
-gboolean slack_set_time (gint64);
-//gboolean slack_set_time (gint64, gboolean);
+gboolean slack_set_time(gint64 seconds_since_epoch, gboolean relative);
// Returns if the hardware clock is set to local time or not
gboolean slack_get_is_localtime ();