Plan 9 from Bell Labs’s /n/sources/contrib/oraccha/iperf3/timer.h

Copyright © 2009 Alcatel-Lucent.
Distributed under the Lucent Public License version 1.02.
Download the Plan 9 distribution.


#ifndef suseconds_t /* PLAN9 */
typedef int suseconds_t;
#endif

struct timer {
    struct timeval begin;
    struct timeval end;
    int (*expired)(struct timer *timer);
};

struct timer *new_timer(time_t sec, suseconds_t usec);

#define DELAY_SELECT_METHOD 1
#if defined(DELAY_NANOSLEEP_METHOD)
int delay(int64_t ns);
#elif defined(DELAY_SELECT_METHOD)
int delay(int us);
#endif
double timeval_to_double(struct timeval *tv);

double timeval_diff(struct timeval *tv0, struct timeval *tv1);

void update_timer(struct timer *tp, time_t sec, suseconds_t usec);

int64_t timer_remaining(struct timer *tp);

void free_timer(struct timer *tp);


(This is a user-contributed directory and
should not be interpreted as statement by Alcatel-Lucent.)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2009 Alcatel-Lucent. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.