Commit 13398397 authored by Christian Kellner's avatar Christian Kellner
Browse files

common: move bolt_now_in_seconds to bolt-time.c/.h

parent 81723b33
......@@ -30,6 +30,7 @@
#include "bolt-names.h"
#include "bolt-store.h"
#include "bolt-str.h"
#include "bolt-time.h"
#include <dirent.h>
#include <libudev.h>
......@@ -489,14 +490,6 @@ bolt_device_class_init (BoltDeviceClass *klass)
/* internal methods */
static guint64
bolt_now_in_seconds (void)
{
gint64 now = g_get_real_time ();
return (guint64) now / G_USEC_PER_SEC;
}
static const char *
read_sysattr_name (struct udev_device *udev, const char *attr, GError **error)
{
......
......@@ -34,3 +34,11 @@ bolt_epoch_format (guint64 seconds, const char *format)
return g_date_time_format (dt, format);
}
guint64
bolt_now_in_seconds (void)
{
gint64 now = g_get_real_time ();
return (guint64) now / G_USEC_PER_SEC;
}
......@@ -27,4 +27,6 @@ G_BEGIN_DECLS
char * bolt_epoch_format (guint64 seconds,
const char *format);
guint64 bolt_now_in_seconds (void);
G_END_DECLS
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment