#lang scheme (require "gettimeofday.ss") (define-struct (microdate date) (microseconds) #:transparent) (define (build-microdate date microseconds) (apply make-microdate (append (cdr (vector->list (struct->vector date))) (list microseconds)))) (define (now) (let-values ([(seconds microseconds) (get-time-of-day)]) (build-microdate (seconds->date seconds) microseconds))) (provide (all-defined-out) get-time-of-day)