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

Author Topic: .net clock  (Read 7097 times)

0 Members and 1 Guest are viewing this topic.

Fox3

  • Newbie
  • *
  • Posts: 10
    • View Profile
.net clock
« on: November 07, 2010, 02:13:16 am »
Where did it go?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
.net clock
« Reply #1 on: November 07, 2010, 10:22:47 am »
It has never existed, the .Net framework already has this kind of classes. That's why there's no binding for the system and network module.
Laurent Gomila - SFML developer

poncho

  • Newbie
  • *
  • Posts: 7
    • View Profile
.net clock
« Reply #2 on: December 16, 2011, 04:54:33 pm »
What classes can be used instead?

I've looked at Stopwatch but apparently people are saying ElapsedTicks is messed up and ElapsedMilliseconds always returns 0 for me.

JohnStabler

  • Newbie
  • *
  • Posts: 8
    • View Profile
.net clock
« Reply #3 on: January 06, 2012, 09:25:43 am »
I've found Window.GetFrameTime the best way to sync update events etc. The .NET timer and StopWatch classes just don't seem to cut it when working to 10s of milliseconds. Try this:

http://www.sfml-dev.org/tutorials/1.3/window-time.php

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
.net clock
« Reply #4 on: January 06, 2012, 01:24:06 pm »
Stopwatch is the most precise timer, it's the equivalent of QueryPerformanceCounter Windows API. Check Stopwatch.Frequency property to see how often it updates.

http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx

 

anything