Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 1, 2009, 5:07:26 PM (15 years ago)
Author:
rgrieder
Message:

Added two little console commands: printFPS and printTickTime for dedicated programs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/Game.cc

    r5845 r5853  
    5757        { Game::getInstance().stop(); }
    5858    SetConsoleCommandShortcutExternAlias(stop_game, "exit");
     59    static void printFPS()
     60        { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; }
     61    SetConsoleCommandShortcutExternAlias(printFPS, "printFPS");
     62    static void printTickTime()
     63        { COUT(0) << Game::getInstance().getAvgTickTime() << std::endl; }
     64    SetConsoleCommandShortcutExternAlias(printTickTime, "printTickTime");
    5965
    6066    std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s;
Note: See TracChangeset for help on using the changeset viewer.