Skip to content

Commit

Permalink
Two code fixes: for latest Core and Ctypes interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Nov 5, 2013
1 parent 33a3ee1 commit 942fe3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/ffi/datetime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let ctime = foreign "ctime" (ptr time_t @-> returning string)

type timeval
let timeval : timeval structure typ = structure "timeval"
let tv_sec = field timeval "tv_sec" long
let tv_usec = field timeval "tv_usec" long
let tv_sec = timeval *:* long
let tv_usec = timeval *:* long
let () = seal timeval

type timezone
Expand Down
4 changes: 2 additions & 2 deletions code/imperative-programming/time_converter2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ let () =
match In_channel.input_line stdin with
| None -> failwith "No timezone provided"
| Some zone_string ->
let zone = Zone.find_exn zone_string in
let zone = Time.Zone.find_exn zone_string in
let time_string = Time.to_string_abs (Time.now ()) ~zone in
printf "The time in %s is %s.\n%!" (Zone.to_string zone) time_string
printf "The time in %s is %s.\n%!" (Time.Zone.to_string zone) time_string

0 comments on commit 942fe3c

Please sign in to comment.