~ubuntu-branches/ubuntu/trusty/keepalived/trusty

« back to all changes in this revision

Viewing changes to lib/timer.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt
  • Date: 2005-04-29 23:22:40 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050429232240-a8m3jtpi3cvuyyy2
Tags: 1.1.11-3
Added a warning about sarge kernels to README.Debian and 
the package description 

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * 
6
6
 * Part:        Timer manipulations.
7
7
 *  
8
 
 * Version:     $Id: timer.c,v 1.1.7 2004/04/04 23:28:05 acassen Exp $
 
8
 * Version:     $Id: timer.c,v 1.1.11 2005/03/01 01:22:13 acassen Exp $
9
9
 * 
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *              
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2004 Alexandre Cassen, <acassen@linux-vs.org>
 
22
 * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
23
23
 */
24
24
 
25
25
#include <stdio.h>
96
96
TIMEVAL
97
97
timer_now(void)
98
98
{
99
 
        TIMEVAL timer_now;
 
99
        TIMEVAL curr_time;
100
100
 
101
101
        /* init timer */
102
 
        TIMER_RESET(timer_now);
103
 
        gettimeofday(&timer_now, NULL);
 
102
        TIMER_RESET(curr_time);
 
103
        gettimeofday(&curr_time, NULL);
104
104
 
105
 
        return timer_now;
 
105
        return curr_time;
106
106
}
107
107
 
108
108
/* sets and returns current time from system time */