Revision 63ebb93d

View differences:

chunklock.c
9 9
#include <string.h>
10 10
#include <stdint.h>
11 11

  
12
#include "compatibility/timer.h"
13

  
12 14
#include "chunklock.h"
13 15

  
14 16
#include "net_helper.h"
compatibility/timer.h
1
#ifndef COMP_TIMER_H
2
#define COMP_TIMER_H
3

  
4
#ifdef WIN32
5
# define timeradd(a, b, result)                                               \
6
  do {                                                                        \
7
    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;                             \
8
    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;                          \
9
    if ((result)->tv_usec >= 1000000)                                         \
10
      {                                                                       \
11
        ++(result)->tv_sec;                                                   \
12
        (result)->tv_usec -= 1000000;                                         \
13
      }                                                                       \
14
  } while (0)
15
# define timersub(a, b, result)                                               \
16
  do {                                                                        \
17
    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
18
    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;                          \
19
    if ((result)->tv_usec < 0) {                                              \
20
      --(result)->tv_sec;                                                     \
21
      (result)->tv_usec += 1000000;                                           \
22
    }                                                                         \
23
  } while (0)
24

  
25
#endif
26

  
27
#endif //COMP_TIMER_H
loop.c
18 18
#include <peerset.h>
19 19
#include <peer.h>
20 20

  
21
#include "compatibility/timer.h"
22

  
21 23
#include "chunk_signaling.h"
22 24
#include "streaming.h"
23 25
#include "topology.h"
topology.c
18 18
#include <topmanager.h>
19 19
#include <tman.h>
20 20

  
21
#include "compatibility/timer.h"
22

  
21 23
#include "topology.h"
22 24
#include "streaming.h"
23 25
#include "dbg.h"

Also available in: Unified diff