aQ^,      !"#$%&'()*+ Copyright 2016 Ertugrul SylemezApache License 2.0!Ertugrul Sylemez <esz@posteo.de>Safe 147>LNV,-Common units of time with constant durations.KThe durations of minutes, hours and days are semi-constant. Days are defined to be constant in universal time, but due to our technical inability to build a universal time clock we use approximations (like UTC), which admit leap seconds for synchronisation. This means that the last minute of a day may take 59 or 61 seconds.Seconds.Minutes.Hours.Days.LCommon units of calendar time. The durations are not necessarily constant.1Weeks starting at the given day (0 means Sunday).Months.Years. ;For most time types the deltas correspond to physical time.Note: In this library physical time essentially means "measured in seconds", not necessarily real time. For example the CPU time passed since program start counts as physical time. 1The number of seconds the given delta represents. Default is const , if  t is an instance of -. The duration of one second. XSome time types measure time relative to a (usually arbitrary but well-defined) origin. The origin of time.Class of time-like types, i.e. types that support time arithmetic with the help of a time-delta type. Instances should satisfy the following laws: daddTime 0 t = t addTime dt1 (addTime dt2 t) = addTime (dt1 + dt2) t addTime (diffTime t1 t2) t2 = t1BFor the common case of one-dimensional, totally ordered time the D function is expected to act like subtraction. This means that if t1 is later than t0, then  t1 t0 will be a positive value.Type of time deltas.4Add the given time delta to the given point in time.+The delta between the given points in time.6Class of time types that measure time in common units.The K function is exclusive with respect to the given point in time, while the  function is inclusive. The skip*l family of functions just skips the given number of the given unit. Examples (numbers represent seconds): iterate (begin Second) 12.3 = [ 12.3, 13.0, 13.0, 13.0, ... ] iterate (next Second) 12.3 = [ 12.3, 13.0, 14.0, 15.0, ... ] iterate (skipOne Second) 12.3 = [ 12.3, 13.3, 14.3, 15.3, ... ],These functions ignore leap seconds, unless tc specifically has a representation for them (such as TAI). For example skipping one second with time's UTCTime. may skip up to two seconds of physical time.aSkip to the beginning of the next given unit of time, unless already at the beginning of a unit.dSkip to the beginning of the next given unit of time, even when already at the beginning of a unit.aSkip the given number of the given units of time, keeping the time within that unit if possible.LSkip one given unit of time, keeping the time within that unit if possible. skipOne = skip 1ZClass of time types that represent universal time and understand weeks, months and years.Skip to the beginning of the next given unit of time according to the represented calendar, unless already at the beginning of a unit.Skip to the beginning of the next given unit of time according to the represented calendar, , even when already at the beginning of a unit.Skip the given number of the given units of time according to the represented calendar, keeping the time within that unit if possible.rSkip one given unit of time according to the represented calendar, keeping the time within that unit if possible. dateSkipOne = dateSkip 1pMost time types represent time as read by an actual clock. Instances of this class support querying that clock.Get the current time.@Sleep until the given point in time. This function first uses l to sleep until just before the goal time. Then it switches to a busy loop until the goal time is reached.This function is provided for applications that need sub-millisecond precision sleeping. However, please note that most applications do not, thus it would just waste power. Also note that there are no real-time guarantees whatsoever.&The idle sleep threshold (first argument) specifies how long before the goal time this function switches to busy sleeping. The best choice is highly system- and application-dependent, but an estimate of slightly above the system's context switching interval should be a good initial guess.Note: the maximum delta generally should not be set too high, because changes in system time are only noticed between individual delays.ESleep until the given point in time. This function repeatedly uses .D with a maximum of the given delta, until the goal time is reached.Note: Generally the maximum delta should not be set too high, because changes in system time are only noticed between individual delays. This is also the main motivation behind this function. 1The number of seconds the given delta represents.%This is a convenience wrapper around  ] that allows you to pass an existing time value instead of a proxy to communicate the type.!$Time delta since the origin of time. *deltaSinceOrigin t = diffTime t timeOrigin"Convenient alias for  5.#7Get the time delta from now to the given point in time. /getDeltaSince t0 = fmap (`diffTime` t0) getTime$=Get the current time. This is a convenience wrapper around .%Convenient alias for  1.&The duration of one second.%This is a convenience wrapper around  ] that allows you to pass an existing time value instead of a proxy to communicate the type.'Convenient alias for  6.(Convenient alias for  0.)Convenient alias for  4.*Convenient alias for  2.+Convenient alias for  3., Idle sleep threshold.+Maximum time an individual delay lasts for. Goal time.+Maximum time an individual delay lasts for. Goal time. !"#$%&'()*+,  !"#$%&'()*+, !&(%*+)"'$#    !"#$%&'()*+/      !"#$%&'()*+,-./0./1.234timel_EUpPjNUToip2GQcK5XElm0Data.Time.ClassTimeUnitSecondMinuteHourDayDateUnitWeekMonthYear TimeSeconds deltaSecs oneSecond TimeOrigin timeOriginTimeDeltaaddTimediffTimeSkipUnitbeginnextskipskipOneSkipDate dateBegindateNextdateSkip dateSkipOneGetTimegetTimebusyDelayUntil delayUntil deltaSecsFordeltaSinceOriginfriday getDeltaSince getTimeAsmonday oneSecondForsaturdaysundaythursdaytuesday wednesdaybaseGHC.Real realToFracReal GHC.Conc.IO threadDelay