Ignore:
Timestamp:
Apr 29, 2012, 10:02:20 PM (8 years ago)
Author:
sam
Message:

core: make timers second-based rather than millisecond-based.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debug/fps.cpp

    r866 r1309  
    6464#if 0
    6565    sprintf(buf, "%2.2f fps (%i)",
    66             1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     66            1.0f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    6767            Ticker::GetFrameNum());
    6868    data->lines[0]->SetText(buf);
    6969
    7070    sprintf(buf, "Game  % 7.2f % 7.2f",
    71             Profiler::GetAvg(Profiler::STAT_TICK_GAME),
    72             Profiler::GetMax(Profiler::STAT_TICK_GAME));
     71            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_GAME),
     72            1e3f * Profiler::GetMax(Profiler::STAT_TICK_GAME));
    7373    data->lines[1]->SetText(buf);
    7474
    7575    sprintf(buf, "Draw  % 7.2f % 7.2f",
    76             Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
    77             Profiler::GetMax(Profiler::STAT_TICK_DRAW));
     76            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
     77            1e3f * Profiler::GetMax(Profiler::STAT_TICK_DRAW));
    7878    data->lines[2]->SetText(buf);
    7979
    8080    sprintf(buf, "Blit  % 7.2f % 7.2f",
    81             Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
    82             Profiler::GetMax(Profiler::STAT_TICK_BLIT));
     81            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
     82            1e3f * Profiler::GetMax(Profiler::STAT_TICK_BLIT));
    8383    data->lines[3]->SetText(buf);
    8484
    8585    sprintf(buf, "Frame % 7.2f % 7.2f",
    86             Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    87             Profiler::GetMax(Profiler::STAT_TICK_FRAME));
     86            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     87            1e3f * Profiler::GetMax(Profiler::STAT_TICK_FRAME));
    8888    data->lines[4]->SetText(buf);
    8989#else
    9090    sprintf(buf, "%2.2f/%2.2f/%2.2f/%2.2f %2.2f fps (%i)",
    91             Profiler::GetAvg(Profiler::STAT_TICK_GAME),
    92             Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
    93             Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
    94             Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    95             1e3f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     91            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_GAME),
     92            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_DRAW),
     93            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_BLIT),
     94            1e3f * Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
     95            1.0f / Profiler::GetAvg(Profiler::STAT_TICK_FRAME),
    9696            Ticker::GetFrameNum());
    9797    data->lines[0]->SetText(buf);
Note: See TracChangeset for help on using the changeset viewer.