Connect IQ > APIメモ > Toybox > System

下位ページ

Content

Module: Toybox::System

基本的はシステムコールを提供するモジュール
  • Since : 1.0.0

Defined Under Namespace

  • Classes: ClockTime, DeviceSettings, Stats

Constant Summary

Setting values for DeviceSettings
  • UNIT_METRIC = 0 : Display units in metric units. Since : 1.0.0
  • UNIT_STATUTE = 1 : Display units in statute units. Since : 1.0.0

  • SCREEN_SHAPE_ROUND = 1 : Since : 1.2.0
  • SCREEN_SHAPE_SEMI_ROUND = 2 : Since : 1.2.0
  • SCREEN_SHAPE_RECTANGLE = 3 : Since : 1.2.0

  • BUTTON_INPUT_SELECT = 0x01 : Since : 1.2.0
  • BUTTON_INPUT_UP = 0x02 : Since : 1.2.0
  • BUTTON_INPUT_DOWN = 0x04 : Since : 1.2.0
  • BUTTON_INPUT_MENU = 0x08 : Since : 1.2.0

関数(要約) System

  • (Object) error(msg) : Call error() to cause an error.
  • (Object) exit : To end execution of the current system cleanly from any point in the app.
  • (System.ClockTime) getClockTime : 現在時刻を取得する
  • (DeviceSetting) getDeviceSettings : Get the device settings with getDeviceSettings().
  • (System.Stats) getSystemStats : Get the current system stats with getSystemStats().
  • (Number) getTimer : Use getTimer() to get the current millisecond timer.
  • (Object) print(x) : Use print() to print to the console.
  • (Object) println(a) : Use println() to print to the console with a line terminator.
  • (Object) trap : In future versions of the SDK trap() will break into the debugger.

関数(詳細) System

(Object) error(msg)

Call error() to cause an error. This will exit the system.
  • Parameters
    • msg (String) : Error message to output
  • Since : 1.0.0

(Object) exit

To end execution of the current system cleanly from any point in the app.
  • Since : 1.0.0

(System.ClockTime) getClockTime : 現在時刻を取得する


(DeviceSetting) getDeviceSettings

Get the device settings with getDeviceSettings().
  • Returns : (DeviceSetting) The current device settings
  • Since : 1.0.0

(System.Stats) getSystemStats

Get the current system stats with getSystemStats().
  • Returns: (System.Stats) Current system stats
  • Since : 1.0.0

(Number) getTimer : 現在のタイマーの時間を取得する[ms]

デバイスが起動してからの時間を取得している気がする。
  • Returns : (Number) システムのタイマー[ms]
  • Since : 1.0.0

(Object) print(x)


Use print() to print to the console

Parameters:

   x —

   Object or string to displays

Since:

   1.0.0

(Object) println(a)


Use println() to print to the console with a line terminator.

Parameters:

   a —

   Object or string to display

Since:

   1.0.0

(Object) trap

In future versions of the SDK trap() will break into the debugger.
  • Since : 1.0.0
最終更新:2016年03月02日 23:44