Simutrans-Squirrel-API
Classes | Functions
api_control.cc File Reference

Go to the source code of this file.

Classes

class  debug
 

Functions

integer get_ops_remaining ()
 
integer get_ops_total ()
 
void sleep ()
 

Detailed Description

script control and debug functions.

Definition in file api_control.cc.

Function Documentation

◆ get_ops_remaining()

integer get_ops_remaining ( )
Returns
amount of remaining opcodes until vm will be suspended

◆ get_ops_total()

integer get_ops_total ( )
Returns
total amount of opcodes executed by vm

◆ sleep()

void sleep ( )

Suspends execution of the script. Upon resume, the script will have full count of opcodes to spent for fragile code, i.e. writing into persistent.