| /* |
| * |
| * Realtime timer with GLib integration |
| * |
| * Copyright (C) 2014 Nest Labs. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with this program; if not, write to the Free Software |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| * |
| */ |
| #include <sys/timerfd.h> |
| #include <glib.h> |
| |
| #define G_CLOCK_REALTIME CLOCK_REALTIME |
| /* if your kernel supports */ |
| /* #define G_CLOCK_BOOTTIME CLOCK_BOOTTIME */ |
| |
| guint g_rttimeout_add_seconds_full (gint type, gint priority, guint32 interval, |
| GSourceFunc function, gpointer data, |
| GDestroyNotify notify); |
| |
| guint g_rttimeout_add_full (gint type, gint priority, guint32 interval, |
| GSourceFunc function, gpointer data, |
| GDestroyNotify notify); |
| |
| gboolean g_rttimeout_source_remove(guint id); |