1*d6b92ffaSHans Petter Selasky /* 2*d6b92ffaSHans Petter Selasky * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. 3*d6b92ffaSHans Petter Selasky * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. 4*d6b92ffaSHans Petter Selasky * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 5*d6b92ffaSHans Petter Selasky * 6*d6b92ffaSHans Petter Selasky * This software is available to you under a choice of one of two 7*d6b92ffaSHans Petter Selasky * licenses. You may choose to be licensed under the terms of the GNU 8*d6b92ffaSHans Petter Selasky * General Public License (GPL) Version 2, available from the file 9*d6b92ffaSHans Petter Selasky * COPYING in the main directory of this source tree, or the 10*d6b92ffaSHans Petter Selasky * OpenIB.org BSD license below: 11*d6b92ffaSHans Petter Selasky * 12*d6b92ffaSHans Petter Selasky * Redistribution and use in source and binary forms, with or 13*d6b92ffaSHans Petter Selasky * without modification, are permitted provided that the following 14*d6b92ffaSHans Petter Selasky * conditions are met: 15*d6b92ffaSHans Petter Selasky * 16*d6b92ffaSHans Petter Selasky * - Redistributions of source code must retain the above 17*d6b92ffaSHans Petter Selasky * copyright notice, this list of conditions and the following 18*d6b92ffaSHans Petter Selasky * disclaimer. 19*d6b92ffaSHans Petter Selasky * 20*d6b92ffaSHans Petter Selasky * - Redistributions in binary form must reproduce the above 21*d6b92ffaSHans Petter Selasky * copyright notice, this list of conditions and the following 22*d6b92ffaSHans Petter Selasky * disclaimer in the documentation and/or other materials 23*d6b92ffaSHans Petter Selasky * provided with the distribution. 24*d6b92ffaSHans Petter Selasky * 25*d6b92ffaSHans Petter Selasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26*d6b92ffaSHans Petter Selasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27*d6b92ffaSHans Petter Selasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28*d6b92ffaSHans Petter Selasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29*d6b92ffaSHans Petter Selasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30*d6b92ffaSHans Petter Selasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31*d6b92ffaSHans Petter Selasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32*d6b92ffaSHans Petter Selasky * SOFTWARE. 33*d6b92ffaSHans Petter Selasky * 34*d6b92ffaSHans Petter Selasky */ 35*d6b92ffaSHans Petter Selasky 36*d6b92ffaSHans Petter Selasky /* 37*d6b92ffaSHans Petter Selasky * Abstract: 38*d6b92ffaSHans Petter Selasky * Declaration of timer abstraction. 39*d6b92ffaSHans Petter Selasky */ 40*d6b92ffaSHans Petter Selasky 41*d6b92ffaSHans Petter Selasky #ifndef _CL_TIMER_H_ 42*d6b92ffaSHans Petter Selasky #define _CL_TIMER_H_ 43*d6b92ffaSHans Petter Selasky 44*d6b92ffaSHans Petter Selasky #include <complib/cl_types.h> 45*d6b92ffaSHans Petter Selasky 46*d6b92ffaSHans Petter Selasky #ifdef __cplusplus 47*d6b92ffaSHans Petter Selasky # define BEGIN_C_DECLS extern "C" { 48*d6b92ffaSHans Petter Selasky # define END_C_DECLS } 49*d6b92ffaSHans Petter Selasky #else /* !__cplusplus */ 50*d6b92ffaSHans Petter Selasky # define BEGIN_C_DECLS 51*d6b92ffaSHans Petter Selasky # define END_C_DECLS 52*d6b92ffaSHans Petter Selasky #endif /* __cplusplus */ 53*d6b92ffaSHans Petter Selasky 54*d6b92ffaSHans Petter Selasky BEGIN_C_DECLS 55*d6b92ffaSHans Petter Selasky /****h* Component Library/Timer 56*d6b92ffaSHans Petter Selasky * NAME 57*d6b92ffaSHans Petter Selasky * Timer 58*d6b92ffaSHans Petter Selasky * 59*d6b92ffaSHans Petter Selasky * DESCRIPTION 60*d6b92ffaSHans Petter Selasky * The Timer provides the ability to schedule a function to be invoked at 61*d6b92ffaSHans Petter Selasky * a given time in the future. 62*d6b92ffaSHans Petter Selasky * 63*d6b92ffaSHans Petter Selasky * The timer callback function must not perform any blocking operations. 64*d6b92ffaSHans Petter Selasky * 65*d6b92ffaSHans Petter Selasky * The timer functions operate on a cl_timer_t structure which should be 66*d6b92ffaSHans Petter Selasky * treated as opaque and should be manipulated only through the provided 67*d6b92ffaSHans Petter Selasky * functions. 68*d6b92ffaSHans Petter Selasky * 69*d6b92ffaSHans Petter Selasky * SEE ALSO 70*d6b92ffaSHans Petter Selasky * Structures: 71*d6b92ffaSHans Petter Selasky * cl_timer_t 72*d6b92ffaSHans Petter Selasky * 73*d6b92ffaSHans Petter Selasky * Callbacks: 74*d6b92ffaSHans Petter Selasky * cl_pfn_timer_callback_t 75*d6b92ffaSHans Petter Selasky * 76*d6b92ffaSHans Petter Selasky * Initialization: 77*d6b92ffaSHans Petter Selasky * cl_timer_construct, cl_timer_init, cl_timer_destroy 78*d6b92ffaSHans Petter Selasky * 79*d6b92ffaSHans Petter Selasky * Manipulation: 80*d6b92ffaSHans Petter Selasky * cl_timer_start, cl_timer_stop 81*d6b92ffaSHans Petter Selasky *********/ 82*d6b92ffaSHans Petter Selasky /****d* Component Library: Timer/cl_pfn_timer_callback_t 83*d6b92ffaSHans Petter Selasky * NAME 84*d6b92ffaSHans Petter Selasky * cl_pfn_timer_callback_t 85*d6b92ffaSHans Petter Selasky * 86*d6b92ffaSHans Petter Selasky * DESCRIPTION 87*d6b92ffaSHans Petter Selasky * The cl_pfn_timer_callback_t function type defines the prototype for 88*d6b92ffaSHans Petter Selasky * functions used to notify users of a timer expiration. 89*d6b92ffaSHans Petter Selasky * 90*d6b92ffaSHans Petter Selasky * SYNOPSIS 91*d6b92ffaSHans Petter Selasky */ 92*d6b92ffaSHans Petter Selasky typedef void (*cl_pfn_timer_callback_t) (IN void *context); 93*d6b92ffaSHans Petter Selasky /* 94*d6b92ffaSHans Petter Selasky * PARAMETERS 95*d6b92ffaSHans Petter Selasky * context 96*d6b92ffaSHans Petter Selasky * [in] Value specified in a previous call to cl_timer_init. 97*d6b92ffaSHans Petter Selasky * 98*d6b92ffaSHans Petter Selasky * RETURN VALUE 99*d6b92ffaSHans Petter Selasky * This function does not return a value. 100*d6b92ffaSHans Petter Selasky * 101*d6b92ffaSHans Petter Selasky * NOTES 102*d6b92ffaSHans Petter Selasky * This function type is provided as function prototype reference for the 103*d6b92ffaSHans Petter Selasky * function provided by users as a parameter to the cl_timer_init function. 104*d6b92ffaSHans Petter Selasky * 105*d6b92ffaSHans Petter Selasky * SEE ALSO 106*d6b92ffaSHans Petter Selasky * Timer, cl_timer_init 107*d6b92ffaSHans Petter Selasky *********/ 108*d6b92ffaSHans Petter Selasky 109*d6b92ffaSHans Petter Selasky /* 110*d6b92ffaSHans Petter Selasky * This include file defines the timer structure, and depends on the timer 111*d6b92ffaSHans Petter Selasky * callback definition. 112*d6b92ffaSHans Petter Selasky */ 113*d6b92ffaSHans Petter Selasky #include <complib/cl_timer_osd.h> 114*d6b92ffaSHans Petter Selasky 115*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_construct 116*d6b92ffaSHans Petter Selasky * NAME 117*d6b92ffaSHans Petter Selasky * cl_timer_construct 118*d6b92ffaSHans Petter Selasky * 119*d6b92ffaSHans Petter Selasky * DESCRIPTION 120*d6b92ffaSHans Petter Selasky * The cl_timer_construct function initializes the state of a timer. 121*d6b92ffaSHans Petter Selasky * 122*d6b92ffaSHans Petter Selasky * SYNOPSIS 123*d6b92ffaSHans Petter Selasky */ 124*d6b92ffaSHans Petter Selasky void cl_timer_construct(IN cl_timer_t * const p_timer); 125*d6b92ffaSHans Petter Selasky /* 126*d6b92ffaSHans Petter Selasky * PARAMETERS 127*d6b92ffaSHans Petter Selasky * p_timer 128*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure whose state to initialize. 129*d6b92ffaSHans Petter Selasky * 130*d6b92ffaSHans Petter Selasky * RETURN VALUE 131*d6b92ffaSHans Petter Selasky * This function does not return a value. 132*d6b92ffaSHans Petter Selasky * 133*d6b92ffaSHans Petter Selasky * NOTES 134*d6b92ffaSHans Petter Selasky * Allows calling cl_timer_destroy without first calling cl_timer_init. 135*d6b92ffaSHans Petter Selasky * 136*d6b92ffaSHans Petter Selasky * Calling cl_timer_construct is a prerequisite to calling any other 137*d6b92ffaSHans Petter Selasky * timer function except cl_timer_init. 138*d6b92ffaSHans Petter Selasky * 139*d6b92ffaSHans Petter Selasky * SEE ALSO 140*d6b92ffaSHans Petter Selasky * Timer, cl_timer_init, cl_timer_destroy 141*d6b92ffaSHans Petter Selasky *********/ 142*d6b92ffaSHans Petter Selasky 143*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_init 144*d6b92ffaSHans Petter Selasky * NAME 145*d6b92ffaSHans Petter Selasky * cl_timer_init 146*d6b92ffaSHans Petter Selasky * 147*d6b92ffaSHans Petter Selasky * DESCRIPTION 148*d6b92ffaSHans Petter Selasky * The cl_timer_init function initializes a timer for use. 149*d6b92ffaSHans Petter Selasky * 150*d6b92ffaSHans Petter Selasky * SYNOPSIS 151*d6b92ffaSHans Petter Selasky */ 152*d6b92ffaSHans Petter Selasky cl_status_t 153*d6b92ffaSHans Petter Selasky cl_timer_init(IN cl_timer_t * const p_timer, 154*d6b92ffaSHans Petter Selasky IN cl_pfn_timer_callback_t pfn_callback, 155*d6b92ffaSHans Petter Selasky IN const void *const context); 156*d6b92ffaSHans Petter Selasky /* 157*d6b92ffaSHans Petter Selasky * PARAMETERS 158*d6b92ffaSHans Petter Selasky * p_timer 159*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure to initialize. 160*d6b92ffaSHans Petter Selasky * 161*d6b92ffaSHans Petter Selasky * pfn_callback 162*d6b92ffaSHans Petter Selasky * [in] Address of a callback function to be invoked when a timer expires. 163*d6b92ffaSHans Petter Selasky * See the cl_pfn_timer_callback_t function type definition for details 164*d6b92ffaSHans Petter Selasky * about the callback function. 165*d6b92ffaSHans Petter Selasky * 166*d6b92ffaSHans Petter Selasky * context 167*d6b92ffaSHans Petter Selasky * [in] Value to pass to the callback function. 168*d6b92ffaSHans Petter Selasky * 169*d6b92ffaSHans Petter Selasky * RETURN VALUES 170*d6b92ffaSHans Petter Selasky * CL_SUCCESS if the timer was successfully initialized. 171*d6b92ffaSHans Petter Selasky * 172*d6b92ffaSHans Petter Selasky * CL_ERROR otherwise. 173*d6b92ffaSHans Petter Selasky * 174*d6b92ffaSHans Petter Selasky * NOTES 175*d6b92ffaSHans Petter Selasky * Allows calling cl_timer_start and cl_timer_stop. 176*d6b92ffaSHans Petter Selasky * 177*d6b92ffaSHans Petter Selasky * SEE ALSO 178*d6b92ffaSHans Petter Selasky * Timer, cl_timer_construct, cl_timer_destroy, cl_timer_start, 179*d6b92ffaSHans Petter Selasky * cl_timer_stop, cl_pfn_timer_callback_t 180*d6b92ffaSHans Petter Selasky *********/ 181*d6b92ffaSHans Petter Selasky 182*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_destroy 183*d6b92ffaSHans Petter Selasky * NAME 184*d6b92ffaSHans Petter Selasky * cl_timer_destroy 185*d6b92ffaSHans Petter Selasky * 186*d6b92ffaSHans Petter Selasky * DESCRIPTION 187*d6b92ffaSHans Petter Selasky * The cl_timer_destroy function performs any necessary cleanup of a timer. 188*d6b92ffaSHans Petter Selasky * 189*d6b92ffaSHans Petter Selasky * SYNOPSIS 190*d6b92ffaSHans Petter Selasky */ 191*d6b92ffaSHans Petter Selasky void cl_timer_destroy(IN cl_timer_t * const p_timer); 192*d6b92ffaSHans Petter Selasky /* 193*d6b92ffaSHans Petter Selasky * PARAMETERS 194*d6b92ffaSHans Petter Selasky * p_timer 195*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure to destroy. 196*d6b92ffaSHans Petter Selasky * 197*d6b92ffaSHans Petter Selasky * RETURN VALUE 198*d6b92ffaSHans Petter Selasky * This function does not return a value. 199*d6b92ffaSHans Petter Selasky * 200*d6b92ffaSHans Petter Selasky * NOTES 201*d6b92ffaSHans Petter Selasky * cl_timer_destroy cancels any pending callbacks. 202*d6b92ffaSHans Petter Selasky * 203*d6b92ffaSHans Petter Selasky * This function should only be called after a call to cl_timer_construct 204*d6b92ffaSHans Petter Selasky * or cl_timer_init. 205*d6b92ffaSHans Petter Selasky * 206*d6b92ffaSHans Petter Selasky * SEE ALSO 207*d6b92ffaSHans Petter Selasky * Timer, cl_timer_construct, cl_timer_init 208*d6b92ffaSHans Petter Selasky *********/ 209*d6b92ffaSHans Petter Selasky 210*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_start 211*d6b92ffaSHans Petter Selasky * NAME 212*d6b92ffaSHans Petter Selasky * cl_timer_start 213*d6b92ffaSHans Petter Selasky * 214*d6b92ffaSHans Petter Selasky * DESCRIPTION 215*d6b92ffaSHans Petter Selasky * The cl_timer_start function sets a timer to expire after a given interval. 216*d6b92ffaSHans Petter Selasky * 217*d6b92ffaSHans Petter Selasky * SYNOPSIS 218*d6b92ffaSHans Petter Selasky */ 219*d6b92ffaSHans Petter Selasky cl_status_t 220*d6b92ffaSHans Petter Selasky cl_timer_start(IN cl_timer_t * const p_timer, IN const uint32_t time_ms); 221*d6b92ffaSHans Petter Selasky /* 222*d6b92ffaSHans Petter Selasky * PARAMETERS 223*d6b92ffaSHans Petter Selasky * p_timer 224*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure to schedule. 225*d6b92ffaSHans Petter Selasky * 226*d6b92ffaSHans Petter Selasky * time_ms 227*d6b92ffaSHans Petter Selasky * [in] Time, in milliseconds, before the timer should expire. 228*d6b92ffaSHans Petter Selasky * 229*d6b92ffaSHans Petter Selasky * RETURN VALUES 230*d6b92ffaSHans Petter Selasky * CL_SUCCESS if the timer was successfully scheduled. 231*d6b92ffaSHans Petter Selasky * 232*d6b92ffaSHans Petter Selasky * CL_ERROR otherwise. 233*d6b92ffaSHans Petter Selasky * 234*d6b92ffaSHans Petter Selasky * NOTES 235*d6b92ffaSHans Petter Selasky * cl_timer_start implicitly stops the timer before being scheduled. 236*d6b92ffaSHans Petter Selasky * 237*d6b92ffaSHans Petter Selasky * The interval specified by the time_ms parameter is a minimum interval. 238*d6b92ffaSHans Petter Selasky * The timer is guaranteed to expire no sooner than the desired interval, but 239*d6b92ffaSHans Petter Selasky * may take longer to expire. 240*d6b92ffaSHans Petter Selasky * 241*d6b92ffaSHans Petter Selasky * SEE ALSO 242*d6b92ffaSHans Petter Selasky * Timer, cl_timer_stop, cl_timer_trim 243*d6b92ffaSHans Petter Selasky *********/ 244*d6b92ffaSHans Petter Selasky 245*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_stop 246*d6b92ffaSHans Petter Selasky * NAME 247*d6b92ffaSHans Petter Selasky * cl_timer_stop 248*d6b92ffaSHans Petter Selasky * 249*d6b92ffaSHans Petter Selasky * DESCRIPTION 250*d6b92ffaSHans Petter Selasky * The cl_timer_stop function stops a pending timer from expiring. 251*d6b92ffaSHans Petter Selasky * 252*d6b92ffaSHans Petter Selasky * SYNOPSIS 253*d6b92ffaSHans Petter Selasky */ 254*d6b92ffaSHans Petter Selasky void cl_timer_stop(IN cl_timer_t * const p_timer); 255*d6b92ffaSHans Petter Selasky /* 256*d6b92ffaSHans Petter Selasky * PARAMETERS 257*d6b92ffaSHans Petter Selasky * p_timer 258*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure. 259*d6b92ffaSHans Petter Selasky * 260*d6b92ffaSHans Petter Selasky * RETURN VALUE 261*d6b92ffaSHans Petter Selasky * This function does not return a value. 262*d6b92ffaSHans Petter Selasky * 263*d6b92ffaSHans Petter Selasky * SEE ALSO 264*d6b92ffaSHans Petter Selasky * Timer, cl_timer_start, cl_timer_trim 265*d6b92ffaSHans Petter Selasky *********/ 266*d6b92ffaSHans Petter Selasky 267*d6b92ffaSHans Petter Selasky /****f* Component Library: Timer/cl_timer_trim 268*d6b92ffaSHans Petter Selasky * NAME 269*d6b92ffaSHans Petter Selasky * cl_timer_trim 270*d6b92ffaSHans Petter Selasky * 271*d6b92ffaSHans Petter Selasky * DESCRIPTION 272*d6b92ffaSHans Petter Selasky * The cl_timer_trim function pulls in the absolute expiration 273*d6b92ffaSHans Petter Selasky * time of a timer if the current expiration time exceeds the specified 274*d6b92ffaSHans Petter Selasky * interval. 275*d6b92ffaSHans Petter Selasky * 276*d6b92ffaSHans Petter Selasky * sets a timer to expire after a given 277*d6b92ffaSHans Petter Selasky * interval if that interval is less than the current timer expiration. 278*d6b92ffaSHans Petter Selasky * 279*d6b92ffaSHans Petter Selasky * SYNOPSIS 280*d6b92ffaSHans Petter Selasky */ 281*d6b92ffaSHans Petter Selasky cl_status_t 282*d6b92ffaSHans Petter Selasky cl_timer_trim(IN cl_timer_t * const p_timer, IN const uint32_t time_ms); 283*d6b92ffaSHans Petter Selasky /* 284*d6b92ffaSHans Petter Selasky * PARAMETERS 285*d6b92ffaSHans Petter Selasky * p_timer 286*d6b92ffaSHans Petter Selasky * [in] Pointer to a cl_timer_t structure to schedule. 287*d6b92ffaSHans Petter Selasky * 288*d6b92ffaSHans Petter Selasky * time_ms 289*d6b92ffaSHans Petter Selasky * [in] Maximum time, in milliseconds, before the timer should expire. 290*d6b92ffaSHans Petter Selasky * 291*d6b92ffaSHans Petter Selasky * RETURN VALUES 292*d6b92ffaSHans Petter Selasky * CL_SUCCESS if the timer was successfully scheduled. 293*d6b92ffaSHans Petter Selasky * 294*d6b92ffaSHans Petter Selasky * CL_ERROR otherwise. 295*d6b92ffaSHans Petter Selasky * 296*d6b92ffaSHans Petter Selasky * NOTES 297*d6b92ffaSHans Petter Selasky * cl_timer_trim has no effect if the time interval is greater than the 298*d6b92ffaSHans Petter Selasky * remaining time when the timer is set. 299*d6b92ffaSHans Petter Selasky * 300*d6b92ffaSHans Petter Selasky * If the new interval time is less than the remaining time, cl_timer_trim 301*d6b92ffaSHans Petter Selasky * implicitly stops the timer before resetting it. 302*d6b92ffaSHans Petter Selasky * 303*d6b92ffaSHans Petter Selasky * If the timer is reset, it is guaranteed to expire no sooner than the 304*d6b92ffaSHans Petter Selasky * new interval, but may take longer to expire. 305*d6b92ffaSHans Petter Selasky * 306*d6b92ffaSHans Petter Selasky * SEE ALSO 307*d6b92ffaSHans Petter Selasky * Timer, cl_timer_start, cl_timer_stop 308*d6b92ffaSHans Petter Selasky *********/ 309*d6b92ffaSHans Petter Selasky 310*d6b92ffaSHans Petter Selasky /****f* Component Library: Time Stamp/cl_get_time_stamp 311*d6b92ffaSHans Petter Selasky * NAME 312*d6b92ffaSHans Petter Selasky * cl_get_time_stamp 313*d6b92ffaSHans Petter Selasky * 314*d6b92ffaSHans Petter Selasky * DESCRIPTION 315*d6b92ffaSHans Petter Selasky * The cl_get_time_stamp function returns the current time stamp in 316*d6b92ffaSHans Petter Selasky * microseconds since the system was booted. 317*d6b92ffaSHans Petter Selasky * 318*d6b92ffaSHans Petter Selasky * SYNOPSIS 319*d6b92ffaSHans Petter Selasky */ 320*d6b92ffaSHans Petter Selasky uint64_t cl_get_time_stamp(void); 321*d6b92ffaSHans Petter Selasky /* 322*d6b92ffaSHans Petter Selasky * RETURN VALUE 323*d6b92ffaSHans Petter Selasky * Time elapsed, in microseconds, since the system was booted. 324*d6b92ffaSHans Petter Selasky * 325*d6b92ffaSHans Petter Selasky * SEE ALSO 326*d6b92ffaSHans Petter Selasky * Timer, cl_get_time_stamp_sec 327*d6b92ffaSHans Petter Selasky *********/ 328*d6b92ffaSHans Petter Selasky 329*d6b92ffaSHans Petter Selasky /****f* Component Library: Time Stamp/cl_get_time_stamp_sec 330*d6b92ffaSHans Petter Selasky * NAME 331*d6b92ffaSHans Petter Selasky * cl_get_time_stamp_sec 332*d6b92ffaSHans Petter Selasky * 333*d6b92ffaSHans Petter Selasky * DESCRIPTION 334*d6b92ffaSHans Petter Selasky * The cl_get_time_stamp_sec function returns the current time stamp in 335*d6b92ffaSHans Petter Selasky * seconds since the system was booted. 336*d6b92ffaSHans Petter Selasky * 337*d6b92ffaSHans Petter Selasky * SYNOPSIS 338*d6b92ffaSHans Petter Selasky */ 339*d6b92ffaSHans Petter Selasky uint32_t cl_get_time_stamp_sec(void); 340*d6b92ffaSHans Petter Selasky /* 341*d6b92ffaSHans Petter Selasky * RETURN VALUE 342*d6b92ffaSHans Petter Selasky * Time elapsed, in seconds, since the system was booted. 343*d6b92ffaSHans Petter Selasky * 344*d6b92ffaSHans Petter Selasky * SEE ALSO 345*d6b92ffaSHans Petter Selasky * Timer, cl_get_time_stamp 346*d6b92ffaSHans Petter Selasky *********/ 347*d6b92ffaSHans Petter Selasky 348*d6b92ffaSHans Petter Selasky END_C_DECLS 349*d6b92ffaSHans Petter Selasky #endif /* _CL_TIMER_H_ */ 350