Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6230181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:42:04+00:00 2026-05-24T09:42:04+00:00

I am using an FPS counter class from an open source project and I

  • 0

I am using an FPS counter class from an open source project and I am having a weird issue. When I run it on my Toshiba Satellite (very fast), the counter seems to max out at 60fps. That’s great. Not a problem. I do have another computer, an EEE and it will clock the FPS as high as it will go. In some cases, it can get 132fps and it’s a much slower computer. This makes it hard to test for framerate increasing on my main coding computer.

So obviously the issue is something non the code calls that is different across processors. Can any of you with a keen eye find out what it is and suggest alternatives? Thank you so much!

header:

#ifndef FPS_COUNTER_H
#define FPS_COUNTER_H

class FPS_COUNTER
{
public:
    void Update(void);                                  //updates counter - call once per frame
    void Shutdown(void);                                //send max, min, average to log
    float GetFps(void)  {       return fps;     }

    FPS_COUNTER() : fps(0.0f), lastTime(0.0f), frames(0L), time(0.0f) 
    {}
    ~FPS_COUNTER()  {}

protected:
    float fps;

    float lastTime;
    long frames;
    float time;
};

#endif  //FPS_COUNTER_H

CPP

#include <windows.h>
#include "LOG.h"
#include "FPS_COUNTER.h"

extern LOG errorLog;

void FPS_COUNTER::Update(void)
{
    //keep track of time lapse and frame count
    time = timeGetTime()*0.001f;                            //get current time in seconds
    ++frames;                                               //increase frame count

    if(time-lastTime>1.0f)                                  //if it has been 1 second
    {
        fps     = frames/(time-lastTime);                   //update fps number
        lastTime= time;                                     //set beginning count
        frames  = 0L;                                       //reset frames this second
    }

}

Edit: I assume it’s in the call to timeGetTime() – is there any way to make it behave the way it does on my EER across any processor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:42:04+00:00Added an answer on May 24, 2026 at 9:42 am

    Check if Vsync is enabled in the computer that caps at 60 FPS. Vsync does exactly cap the framerate to the motitor sync rate. To get uncapped FPS, just disable Vsync in the graphics drivers control panel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using JDeveloper , I started developing a set of web pages for a project
Using C#, I need a class called User that has a username, password, active
I'm using amazing FPS and I have to store the secret key in the
I am currently working on designing my first FPS game using JOGL. (Java bindings
I'm using GLUT and developing a FPS game. I need a way to trap
Can I take the image feed from Analog Camera using OpenCV, in a similar
I need to extract the audio from a FLV file recorded using FMS. I
I am attempting to pull some information from my tnsnames file using regex. I
Using online interfaces to a version control system is a nice way to have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.