/**
* @brief fetches the value from the monotonic clock source.
+ * @return the time since system start in nanoseconds, 0 if read was unsuccessful
+ */
+long long monotonic_clock_gettime_nano()
+{
+ long int seconds;
+ long int nano_seconds;
+ long long nano=0;
+
+ if (monotonic_clock_gettime(seconds,nano_seconds))
+ {
+ nano=seconds;
+ nano*=1000000000LL;
+ nano+=nano_seconds;
+ }
+
+ return nano;
+}
+
+/**
+ * @brief fetches the value from the monotonic clock source.
* @param[out] seconds the seconds.
* @param[out] nano_seconds the nano seconds.
* @return @a true if the clock was successfully read.
bool monotonic_clock_gettime(long int& seconds, long int& nano_seconds);
+long long monotonic_clock_gettime_nano();
bool realtime_clock_gettime(long int& seconds, long int& nano_seconds);