X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Ftimeval.h;h=89abe803635340f3b3e1c31beacd14967a1385ce;hb=76f105d9be03588c2d5ec0b94ff769a1d269f2e4;hp=660a2074c90fecc7fd0b495a6445a18832072a4d;hpb=34e63086edddcae06d7c1a4fa84fec0861e50758;p=openvswitch diff --git a/lib/timeval.h b/lib/timeval.h index 660a2074..89abe803 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,10 @@ #include "type-props.h" #include "util.h" +#ifdef __cplusplus +extern "C" { +#endif + struct pollfd; struct timeval; @@ -41,6 +45,9 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t)); #define TIME_UPDATE_INTERVAL 100 void time_init(void); +void time_disable_restart(void); +void time_enable_restart(void); +void time_postfork(void); void time_refresh(void); time_t time_now(void); long long int time_msec(void); @@ -48,4 +55,10 @@ void time_timeval(struct timeval *); void time_alarm(unsigned int secs); int time_poll(struct pollfd *, int n_pollfds, int timeout); +long long int timeval_to_msec(const struct timeval *); + +#ifdef __cplusplus +} +#endif + #endif /* timeval.h */