-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient-timer.h
More file actions
executable file
·39 lines (30 loc) · 852 Bytes
/
client-timer.h
File metadata and controls
executable file
·39 lines (30 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/******************************************************************************
*
* FILE NAME : client-timer.h
* VERSION : 1.0
* DESCRIPTION: program for testing posix timer.
*
******************************************************************************/
#ifndef _CLIENT_TIMER_H_
#define _CLIENT_TIMER_H_
#include <stdio.h>
typedef struct
{
int opera; /* opera type */
int timer; /* timer index */
} OPEAR_ARR;
#define OPERA_NUM 5
#define SLEEP_TIME (OPERA_NUM + 2)
#define CLIENT_OK 0
#define CLIENT_ERR -1
#define MSG_LOG(...) do { \
printf("Function:%s, Line:%d.", __FUNCTION__, __LINE__); \
printf(__VA_ARGS__); \
printf("\n"); \
} while(0)
#define MSG_ERR(...) do { \
printf("Function:%s, Line:%d.", __FUNCTION__, __LINE__); \
printf(__VA_ARGS__); \
printf("\n"); \
} while(0)
#endif