Manually tested on Windows Tested on i686-linux, committed on trunk This routine is used by the delay and delay until statements. The previous implementation was using the monotonic clock (the clock used by Ada.Real_Time) to compute the duration. This was not correct for the delay until statement when the delay_expression is an Ada.Calendar.Time. Indeed this time could have been adjusted by a DST, a user or by the GNAT runtime to resync the performance counter and the current time. This new implementation properly use the clock or monotonic clock depending on the time (Calendar.Time or Real_Time.Time) used for delay_expression. -- The following program must keep a delay until close to 10 seconds even after a long run (more than 10 hours). -- with Ada.Calendar; with Ada.Text_IO; procedure Test_Delay_Until is use Ada.Calendar; use Ada.Text_IO; Stamp : Ada.Calendar.Time; begin loop Stamp := Clock; delay until Stamp + 10.0; Put_Line (Duration'Image (Clock - Stamp)); end loop; end Test_Delay_Until; 2007-04-06 Pascal Obry * s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one or the monotonic used by Ada.Real_Time) to compute the sleep duration on Windows.