#include <glib.h>
#include <string.h>
-#include "bluesky.h"
+#include "bluesky-private.h"
/* Miscellaneous useful functions that don't really fit anywhere else. */
+bluesky_time_hires bluesky_now_hires()
+{
+ struct timespec time;
+
+ if (clock_gettime(CLOCK_REALTIME, &time) != 0) {
+ perror("clock_gettime");
+ return 0;
+ }
+
+ return (int64_t)(time.tv_sec) * 1000000000 + time.tv_nsec;
+}
/* Convert a UTF-8 string to lowercase. This can be used to implement
* case-insensitive lookups and comparisons, by normalizing all values to