Skip to content
reduz edited this page Feb 23, 2014 · 15 revisions

OS

Inherits: Object\n\n

Brief Description

Operating System functions.

Member Functions

Numeric Constants

  • DAY_SUNDAY = 0
  • DAY_MONDAY = 1
  • DAY_TUESDAY = 2
  • DAY_WEDNESDAY = 3
  • DAY_THURSDAY = 4
  • DAY_FRIDAY = 5
  • DAY_SATURDAY = 6
  • MONTH_JANUARY = 0
  • MONTH_FEBRUARY = 1
  • MONTH_MARCH = 2
  • MONTH_APRIL = 3
  • MONTH_MAY = 4
  • MONTH_JUNE = 5
  • MONTH_JULY = 6
  • MONTH_AUGUST = 7
  • MONTH_SEPTEMBER = 8
  • MONTH_OCTOBER = 9
  • MONTH_NOVEMBER = 10
  • MONTH_DECEMBER = 11

Description

Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: -Mouse Grabbing -Mouse Cursors
-Clipboard -Video Mode -Date " Time -Timers
-Environment Variables -Execution of Binaries -Command Line

Member Function Description

  • void set_iterations_per_second ( int iterations_per_second ) \ Set the amount of fixed iterations per second (for fixed process and physics).
  • void set_low_processor_usage_mode ( bool enable ) \ Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu.
  • int execute ( String path, StringArray arguments, bool blocking ) \ Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
  • void delay_usec ( int usec ) const \ Delay executing of the current thread by given usecs.
  • int get_ticks_msec ( ) const \ Return the amount of time passed in milliseconds since the engine started.
  • bool can_draw ( ) const \ Return true if the host OS allows drawing.
Clone this wiki locally