Defines | Typedefs | Functions

kogmo_time.h File Reference

Definition of Time Handling Types and Functions (C-Interface). More...

#include <inttypes.h>

Go to the source code of this file.

Defines

#define _const
 constant argument, but irrelevant in C
#define KOGMO_TIMESTAMP_TICKSPERSECOND   1000000000
 Ticks per Second. Value, by which the result from kogmo_timestamp_now() will be incremented every second.
#define KOGMO_TIMESTAMP_NANOSECONDSPERTICK   (1000000000/KOGMO_TIMESTAMP_TICKSPERSECOND)
#define KOGMO_TIMESTAMP_STRINGLENGTH   30
 Length of the Output of kogmo_timestamp_to_string().

Typedefs

typedef int64_t kogmo_timestamp_t
 Absolute Timestamp (in Ticks since the "Epoch").
typedef char kogmo_timestamp_string_t [KOGMO_TIMESTAMP_STRINGLENGTH]
 Type of a pre-allocated String to receive the Output of kogmo_timestamp_to_string().

Functions

kogmo_timestamp_t kogmo_timestamp_now (void)
 Get absolute Timestamp for current Time.
int64_t kogmo_timestamp_diff_ns (kogmo_timestamp_t ts_begin, kogmo_timestamp_t ts_end)
 Calcute difference between two Timestamps (in Nanoseconds).
double kogmo_timestamp_diff_secs (kogmo_timestamp_t ts_begin, kogmo_timestamp_t ts_end)
 Calcute difference between two Timestamps (in Seconds, floating point).
kogmo_timestamp_t kogmo_timestamp_add_ns (kogmo_timestamp_t ts, int64_t ns)
 Add time offset to Timestamps (in Nanoseconds).
kogmo_timestamp_t kogmo_timestamp_add_secs (kogmo_timestamp_t ts, double secs)
 Add time offset to Timestamps (in Seconds, floating point).
int kogmo_timestamp_to_string (kogmo_timestamp_t ts, kogmo_timestamp_string_t str)
 Convert an Absolute Timestamp to a String, formated according to the ISO-Standard.
kogmo_timestamp_t kogmo_timestamp_from_string (_const char *str)
 Convert an ISO-Time-String to an Absolute Timestamp.

Detailed Description

Definition of Time Handling Types and Functions (C-Interface).

Copyright (c) 2005,2006 Matthias Goebl <matthias.goebl*goebl.net> Lehrstuhl fuer Realzeit-Computersysteme (RCS) Technische Universitaet Muenchen (TUM)

Definition in file kogmo_time.h.


Generated for KogMo-RTDB by Matthias.Goebl (mattias.goebl*kogmo-rtdb.de) - all rights reserved.