/*++ /* NAME /* sane_time 3 /* SUMMARY /* time(2) with backward time jump protection. /* SYNOPSIS /* #include <sane_time.h> /* /* time_t sane_time(void) /* /* DESCRIPTION /* This module provides time(2) like call for applications /* which need monotonically increasing time function rather /* than the real exact time. It eliminates the need for various /* workarounds all over the application which would handle /* potential problems if time suddenly jumps backward. /* Instead we choose to deal with this problem inside this /* module and let the application focus on its own tasks. /* /* sane_time() returns the current timestamp as obtained from /* time(2) call, at least most of the time. In case this routine /* detects that time has jumped backward, it keeps returning /* whatever timestamp it returned before, until this timestamp /* and the time(2) timestamp become synchronized again. /* Additionally, the returned timestamp is slowly increased to /* prevent the faked clock from freezing for too long. /* SEE ALSO /* time(2) get current time /* DIAGNOSTICS /* Warning message is logged if backward time jump is detected. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Patrik Rak /* Modra 6 /* 155 00, Prague, Czech Republic
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.