]> git.stg.codes - stg.git/blob - include/stg_comp_stat.h
Fix group for file database
[stg.git] / include / stg_comp_stat.h
1 #ifndef STG_COMP_STAT_H
2 #define STG_COMP_STAT_H
3
4 #ifdef LINUX
5 #include <stdint.h>
6 #endif
7
8 #ifdef FREE_BSD5
9 #include <inttypes.h>
10 #endif
11
12 #ifdef FREE_BSD
13 #include <sys/inttypes.h>
14 #endif
15
16 #include "stg_const.h"
17 //-----------------------------------------------------------------------------
18 struct DAY_STAT
19 {
20     DAY_STAT()
21     {
22         lastUpdate = 0;
23         memset(upload,      0, sizeof(uint64_t) * DIR_NUM);
24         memset(download,    0, sizeof(uint64_t) * DIR_NUM);
25         memset(cash,        0, sizeof(double) * DIR_NUM);
26     }
27
28     time_t      lastUpdate;
29     uint64_t    upload[DIR_NUM];
30     uint64_t    download[DIR_NUM];
31     double      cash[DIR_NUM];
32 };
33 //-----------------------------------------------------------------------------
34 struct MONTH_STAT
35 {
36     DAY_STAT    dayStat[31];
37     char        notUsed;
38 };
39 //-----------------------------------------------------------------------------
40
41 #endif //STG_COMP_STAT_H