File: func_time.h

package info (click to toggle)
arpalert 2.0.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,332 kB
  • ctags: 415
  • sloc: ansic: 4,185; sh: 447; makefile: 153; perl: 28
file content (20 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef __FUNC_TIME_H__
#define __FUNC_TIME_H__

#define BIGEST     1
#define EQUAL      0
#define SMALLEST  -1

/* compare t1 to t2
 * si t1 > t2 =>  1
 * si t1 = t2 =>  0
 * si t1 < t2 => -1
 */
int time_comp(struct timeval *t1, struct timeval *t2);

// minus function for struct timeval
// t1 - t2 => res
void time_sous(struct timeval *t1, struct timeval *t2,
               struct timeval *res);

#endif