1 /* $NetBSD: getsecs.c,v 1.4 2009/01/12 11:32:44 tsutsui Exp $ */
3 /* extracted from netbsd:sys/arch/i386/netboot/misc.c */
7 #include <lib/libsa/stand.h>
8 #include <lib/libsa/net.h>
12 static inline u_long
bcd2dec(u_long
);
17 return (arg
>> 4) * 10 + (arg
& 0x0f);
23 * Return the current time in seconds
32 sec
= bcd2dec(t
& 0xff);
35 sec
+= bcd2dec(t
& 0xff);
38 sec
+= bcd2dec(t
& 0xff);