Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::Clock.getElapseTime().asSecond() return wrong value on my computer  (Read 4189 times)

0 Members and 1 Guest are viewing this topic.

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
I print it out it says 2.6e-005 I did it on another computer with the same code it says about 0.000188
what's wrong with the first computer?

Silvah

  • Guest
It needed seven times less time (0.000026 s vs 0.000188 s), if that can be called "wrong".

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
it looks like the first computer get each time less than the second it is always about 2.6e-005 and 2.7e-005
when I add to float variable the first computer is slower than the second one.

ps. these spec of these 2 computers are likely

aratnon

  • Newbie
  • *
  • Posts: 24
    • View Profile
alright, I place clock.restart() after window.display() and window.clear() so it returns wrong value  ;D

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Show us complete and minimal code that reproduces your problem. I think I know what your "problem" is, but I can't be sure without code.
I use the latest build of SFML2

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Is there really even a problem here? It's just displaying very small numbers. What's wrong about that?
DSFML - SFML for the D Programming Language.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
ps. these spec of these 2 computers are likely
Just to make that clear again: Such small differences in timing don't imply that there is something wrong. There are a lot of factors which influence the timeliness of your application, hardware is just one. Process scheduling is also affected by other applications, background processes and energy settings, so even if "the specs are similar" (whatever that means), it's very unlikely you achieve exactly the same timing.

Thus, we're discussing a non-problem here.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: