Time module

Raise events for surfaces at certain time intervals.

This module uses the Event module.

See also

Usage

require('stdlib/event/time')

Functions

get_day_time (surface) Get the current time of a given surface.

Fields

Event.Time.daily
Event.Time.hourly
Event.Time.midday
Event.Time.midnight
Event.Time.minutely
Event.Time.sunrise
Event.Time.sunset

Functions

# get_day_time (surface)

Get the current time of a given surface.

Parameters: Returns:
  • (double) the current surface time such that 0.0 ⋜ surface time ⋜ 1.0

Fields

# Event.Time.daily
  • daily : Fires every day for a surface
# Event.Time.hourly
  • hourly : Fires every hour for a surface
# Event.Time.midday
  • midday : Fires whenever it becomes midday/noon on a surface
# Event.Time.midnight
  • midnight : Fires whenever it becomes midnight on a surface
# Event.Time.minutely
  • minutely : Fires every minute for a surface
# Event.Time.sunrise
  • sunrise : Fires whenever the sunrises on a surface
# Event.Time.sunset
  • sunset : Fires whenever the sunsets on a surface