Coverage Report

Created: 2025-12-28 06:16

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tarantool/src/lib/swim/swim_ev.c
Line
Count
Source
1
/*
2
 * Copyright 2010-2019, Tarantool AUTHORS, please see AUTHORS file.
3
 *
4
 * Redistribution and use in source and binary forms, with or
5
 * without modification, are permitted provided that the following
6
 * conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above
9
 *    copyright notice, this list of conditions and the
10
 *    following disclaimer.
11
 *
12
 * 2. Redistributions in binary form must reproduce the above
13
 *    copyright notice, this list of conditions and the following
14
 *    disclaimer in the documentation and/or other materials
15
 *    provided with the distribution.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21
 * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
28
 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29
 * SUCH DAMAGE.
30
 */
31
#include "swim_ev.h"
32
#include "tarantool_ev.h"
33
#include "fiber.h"
34
35
double
36
swim_time(void)
37
0
{
38
0
  return fiber_clock();
39
0
}
40
41
void
42
swim_ev_timer_start(struct ev_loop *loop, struct ev_timer *watcher)
43
0
{
44
0
  ev_timer_start(loop, watcher);
45
0
}
46
47
void
48
swim_ev_timer_again(struct ev_loop *loop, struct ev_timer *watcher)
49
0
{
50
0
  ev_timer_again(loop, watcher);
51
0
}
52
53
void
54
swim_ev_timer_stop(struct ev_loop *loop, struct ev_timer *watcher)
55
0
{
56
0
  ev_timer_stop(loop, watcher);
57
0
}
58
59
struct ev_loop *
60
swim_loop(void)
61
0
{
62
0
  return loop();
63
0
}