Version française
Home     About     Download     Resources     Contact us    
Browse thread
.-
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benjamin Geer <ben@s...>
Subject: Re: [Caml-list] .-
On Friday 24 December 2004 10:04, Anastasia Gornostaeva wrote:
> gives an negative result -7200.000000. Why?

I just tried it and got this result:

        Objective Caml version 3.08.1

# #load "unix.cma" ;;
# open Unix

  let _ =
     let curr_time = time () in
     let curr_tm = gmtime curr_time in
     let new_time, _ = mktime {curr_tm with tm_hour = curr_tm.tm_hour+1} in
     let diff = new_time -. curr_time in
        Printf.printf "%f\n%f\n%f\n"
           curr_time
           new_time
           diff  ;;
1103885443.000000
1103889043.000000
3600.000000
- : unit = ()

Ben