• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

ser_time.h

00001 /* 
00002  * $Id$
00003  * 
00004  * time related functions
00005  *
00006  * Copyright (C) 2006 iptelorg GmbH
00007  *
00008  * Permission to use, copy, modify, and distribute this software for any
00009  * purpose with or without fee is hereby granted, provided that the above
00010  * copyright notice and this permission notice appear in all copies.
00011  *
00012  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00013  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00014  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00015  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00016  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00017  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00018  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00019  */
00020 /* History:
00021  * --------
00022  *  2008-07-16  initial version (andrei)
00023  */
00024 #ifndef _ser_time_h
00025 #define _ser_time_h
00026 
00027 #include <sys/time.h>
00028 #include <time.h>
00029 
00030 /* time(2) equivalent, using ser internal timers (faster then a syscall) */
00031 time_t ser_time(time_t* t);
00032 
00033 /* gettimeofday(2) equivalent, faster but much more imprecise
00034  * (in normal conditions should be within 0.1 s of the real time)
00035  * WARNING: ignores tz (it's obsolete anyway) */
00036 int ser_gettimeofday(struct timeval* tv, const struct timezone *tz);
00037 
00038 #endif /* _ser_time_h */

Generated on Tue May 22 2012 13:10:15 for SIP Router by  doxygen 1.7.1