xref: /netbsd-src/sys/arch/evbmips/stand/sbmips/netboot/getsecs.c (revision 5edf0f54e0a08cbfb40c3f76590b1dddeb44e6c5)
1*5edf0f54Smrg /* $NetBSD: getsecs.c,v 1.2 2017/07/24 10:34:55 mrg Exp $ */
2b1431b71Smrg 
3b1431b71Smrg /*
4b1431b71Smrg  * Copyright 2001
5b1431b71Smrg  * Broadcom Corporation. All rights reserved.
6b1431b71Smrg  *
7b1431b71Smrg  * This software is furnished under license and may be used and copied only
8b1431b71Smrg  * in accordance with the following terms and conditions.  Subject to these
9b1431b71Smrg  * conditions, you may download, copy, install, use, modify and distribute
10b1431b71Smrg  * modified or unmodified copies of this software in source and/or binary
11b1431b71Smrg  * form. No title or ownership is transferred hereby.
12b1431b71Smrg  *
13b1431b71Smrg  * 1) Any source code used, modified or distributed must reproduce and
14b1431b71Smrg  *    retain this copyright notice and list of conditions as they appear in
15b1431b71Smrg  *    the source file.
16b1431b71Smrg  *
17b1431b71Smrg  * 2) No right is granted to use any trade name, trademark, or logo of
18b1431b71Smrg  *    Broadcom Corporation.  The "Broadcom Corporation" name may not be
19b1431b71Smrg  *    used to endorse or promote products derived from this software
20b1431b71Smrg  *    without the prior written permission of Broadcom Corporation.
21b1431b71Smrg  *
22b1431b71Smrg  * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
23b1431b71Smrg  *    WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
24b1431b71Smrg  *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
25b1431b71Smrg  *    NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
26b1431b71Smrg  *    FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
27b1431b71Smrg  *    LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28b1431b71Smrg  *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29b1431b71Smrg  *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30b1431b71Smrg  *    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31b1431b71Smrg  *    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32b1431b71Smrg  *    OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33b1431b71Smrg  */
34b1431b71Smrg 
35b1431b71Smrg #include <sys/param.h>
36b1431b71Smrg #include <sys/types.h>
37b1431b71Smrg 
38b1431b71Smrg #include <netinet/in.h>
39b1431b71Smrg #include <netinet/in_systm.h>
40b1431b71Smrg 
41b1431b71Smrg 
42b1431b71Smrg #include <lib/libsa/stand.h>
43b1431b71Smrg #include <lib/libsa/net.h>
44b1431b71Smrg 
45*5edf0f54Smrg #include "stand/sbmips/common/cfe_api.h"
46b1431b71Smrg 
47b1431b71Smrg satime_t
getsecs(void)48b1431b71Smrg getsecs(void)
49b1431b71Smrg {
50b1431b71Smrg 	long long time;
51b1431b71Smrg 
52b1431b71Smrg 	time = cfe_getticks();
53b1431b71Smrg 
54b1431b71Smrg 	return (time / 10);
55b1431b71Smrg }
56