clock.h (b6bacd3150f411c3de886f7615bc22129b6974ad) clock.h (ba00ec3d539f213abbda3a45ef8c539306cac098)
1/*
2 * Copyright (c) 1998-2001, 2004 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
1/*
2 * Copyright (c) 1998-2001, 2004 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 * $Id: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
12 * $Id: clock.h,v 1.13 2011/11/03 03:13:24 ca Exp $
13 */
14
15/*
16** CLOCK.H -- for co-ordinating timed events
17*/
18
19#ifndef _SM_CLOCK_H
20# define _SM_CLOCK_H 1

--- 33 unchanged lines hidden (view full) ---

54extern void sm_clear_events __P((void));
55extern SM_EVENT *sm_seteventm __P((int, void(*)__P((int)), int));
56extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)__P((int)), int));
57extern SIGFUNC_DECL sm_tick __P((int));
58
59/*
60** SM_SETEVENT -- set an event to happen at a specific time in seconds.
61**
13 */
14
15/*
16** CLOCK.H -- for co-ordinating timed events
17*/
18
19#ifndef _SM_CLOCK_H
20# define _SM_CLOCK_H 1

--- 33 unchanged lines hidden (view full) ---

54extern void sm_clear_events __P((void));
55extern SM_EVENT *sm_seteventm __P((int, void(*)__P((int)), int));
56extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)__P((int)), int));
57extern SIGFUNC_DECL sm_tick __P((int));
58
59/*
60** SM_SETEVENT -- set an event to happen at a specific time in seconds.
61**
62** Translates the seconds into millseconds and calls sm_seteventm()
62** Translates the seconds into milliseconds and calls sm_seteventm()
63** to get a specific event to happen in the future at a specific time.
64**
65** Parameters:
66** t -- intvl until next event occurs (seconds).
67** f -- function to call on event.
68** a -- argument to func on event.
69**
70** Returns:
71** result of sm_seteventm().
72**
73** Side Effects:
74** Any that sm_seteventm() have.
75*/
76
77#define sm_setevent(t, f, a) sm_seteventm((int)((t) * 1000), (f), (a))
78#define sm_sigsafe_setevent(t, f, a) sm_sigsafe_seteventm((int)((t) * 1000), (f), (a))
79
80#endif /* _SM_CLOCK_H */
63** to get a specific event to happen in the future at a specific time.
64**
65** Parameters:
66** t -- intvl until next event occurs (seconds).
67** f -- function to call on event.
68** a -- argument to func on event.
69**
70** Returns:
71** result of sm_seteventm().
72**
73** Side Effects:
74** Any that sm_seteventm() have.
75*/
76
77#define sm_setevent(t, f, a) sm_seteventm((int)((t) * 1000), (f), (a))
78#define sm_sigsafe_setevent(t, f, a) sm_sigsafe_seteventm((int)((t) * 1000), (f), (a))
79
80#endif /* _SM_CLOCK_H */