[gnome-bluetooth] sendto: move get_system_time() up
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] sendto: move get_system_time() up
- Date: Tue, 21 May 2013 14:13:23 +0000 (UTC)
commit 95df43041ab2f2392803bbf243e875466cde4b58
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Mon May 20 11:05:22 2013 +0200
sendto: move get_system_time() up
This is a utility function that can be before the rest
of the code.
sendto/main.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/sendto/main.c b/sendto/main.c
index 4846a78..c573f5c 100644
--- a/sendto/main.c
+++ b/sendto/main.c
@@ -80,6 +80,17 @@ static gboolean error_callback(GDBusMethodInvocation *context,
const char *message,
gpointer user_data);
+static gint64
+get_system_time (void)
+{
+ struct timeval tmp;
+
+ gettimeofday(&tmp, NULL);
+
+ return (gint64) tmp.tv_usec +
+ (gint64) tmp.tv_sec * G_GINT64_CONSTANT(1000000);
+}
+
static void
send_files (void)
{
@@ -130,16 +141,6 @@ static gchar *filename_to_path(const gchar *filename)
return path;
}
-static gint64 get_system_time(void)
-{
- struct timeval tmp;
-
- gettimeofday(&tmp, NULL);
-
- return (gint64) tmp.tv_usec +
- (gint64) tmp.tv_sec * G_GINT64_CONSTANT(1000000);
-}
-
static gchar *format_time(gint seconds)
{
gint hours, minutes;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]