extern void bn_long_to_bnettime(bn_long in, t_bnettime * out) { if (!out) { eventlog(eventlog_level_error, __FUNCTION__, "got NULL out"); return; } out->u = bn_long_get_a(in); out->l = bn_long_get_b(in); }
static void timeinfo(t_bnettime bnt) { time_t t; char out[1024]; bn_long num; bnettime_to_bn_long(bnt,&num); t = bnettime_to_time(bnt); strftime(out,sizeof(out),"%Y %b %d %H:%M:%S",localtime(&t)); printf("%20s %g u:0x%08x l:0x%08x\n",out,(double)t,bn_long_get_a(num),bn_long_get_b(num)); }