class Tessell::App::Runner

Defined in:

tessell/app/runner.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def advance(now_ms : Int64) : Bool #

平台每帧调用一次:now_ms 为平台单调时钟。返回 should_stop?, 平台据此退出泵循环并清理。


[View source]
def clock_ms : Int64 #

[View source]
def frame_budget_ms : Float32 #

[View source]
def frame_budget_ms=(frame_budget_ms : Float32) #

[View source]
def frame_count : Int32 #

[View source]
def frame_ms : Float32 #

[View source]
def frames_limit : Int32 #

[View source]
def frames_limit=(frames_limit : Int32) #

[View source]
def load_state(path : String) : Int32 #

返回恢复的 signal 数;文件不存在返回 0(首次启动)。


[View source]
def on_frame(&block : Runner -> Nil) : Nil #

[View source]
def save_state(path : String) : Nil #

---- 状态快照(issue #39 第一期:重启式热重载)---- 退出前 save_state → 重启后 load_state:保留的是命名 signal 值, views 全量 remount(asuka RFC 0003 口径)。control socket + fd 继承两件套属平台层后续工作(POSIX fd 与 Windows 语义不同)。


[View source]
def should_stop? : Bool #

[View source]
def slow_frames : Int32 #

[View source]
def stop : Nil #

[View source]