stdtime.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004, 2005, 2007, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2001  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id$ */
00019 
00020 #ifndef ISC_STDTIME_H
00021 #define ISC_STDTIME_H 1
00022 
00023 /*! \file */
00024 
00025 #include <isc/lang.h>
00026 #include <isc/int.h>
00027 
00028 /*%
00029  * It's public information that 'isc_stdtime_t' is an unsigned integral type.
00030  * Applications that want maximum portability should not assume anything
00031  * about its size.
00032  */
00033 typedef isc_uint32_t isc_stdtime_t;
00034 
00035 /* but this flag helps... */
00036 #define STDTIME_ON_32BITS       1
00037 
00038 /*
00039  * isc_stdtime32_t is a 32-bit version of isc_stdtime_t.  A variable of this
00040  * type should only be used as an opaque integer (e.g.,) to compare two
00041  * time values.
00042  */
00043 typedef isc_uint32_t isc_stdtime32_t;
00044 
00045 ISC_LANG_BEGINDECLS
00046 /* */
00047 void
00048 isc_stdtime_get(isc_stdtime_t *t);
00049 /*%<
00050  * Set 't' to the number of seconds since 00:00:00 UTC, January 1, 1970.
00051  *
00052  * Requires:
00053  *
00054  *\li   't' is a valid pointer.
00055  */
00056 
00057 #define isc_stdtime_convert32(t, t32p) (*(t32p) = t)
00058 /*
00059  * Convert the standard time to its 32-bit version.
00060  */
00061 
00062 ISC_LANG_ENDDECLS
00063 
00064 #endif /* ISC_STDTIME_H */

Generated on Tue Apr 28 17:41:05 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha