Search found 7 matches

by Ariphael
February 12th, 2017, 12:00 pm
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Re: Problem with the chrono library

That will work, but it is not the best solution IMO. Take a closer look at how I do it in the chrono video. I don't put code in Game::Go, just one call to ft.Mark() in the same place every frame, in UpdateModel(). oh, you only needed the mark function and define std::chrono::steady_clock::time_poin...
by Ariphael
February 12th, 2017, 8:01 am
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Re: Problem with the chrono library

Ok, like I said, you need to have the measured time cover the entire frame. Currently, you are only measuring the controls and drawing the box, you still aren't taking into account the gfx.BeginFrame and gfx.EndFrame() You need to do something like this Elapsed = timer.Mark(); timer.Point(); So tha...
by Ariphael
February 12th, 2017, 5:33 am
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Re: Problem with the chrono library

Looks like you cleaned it properly ;) I will take a look at this in a bit and get back to you bro. i accidently put timer.mark() in DrawBox function, i was supposed to put it in composeframe, but the time interval is still so small. So I put it in ComposeFrame, and now the time interval is ~2e-5 wh...
by Ariphael
February 12th, 2017, 5:27 am
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Re: Problem with the chrono library

oops, i put the timer.mark() in the wrong function, but that does not fix anything.
by Ariphael
February 12th, 2017, 5:21 am
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Re: Problem with the chrono library

chili wrote:Ariphael, looks like you had a problem creating / uploading the git repo. Either try again, or clean/zip the solution folder and upload it here.
MrGodin wrote:The repository is empty.. ?
ok i have attached the solution in a zip file, download that.
by Ariphael
February 11th, 2017, 11:35 am
Forum: Everything
Topic: Problem with the chrono library
Replies: 11
Views: 3605

Problem with the chrono library

I have a problem, when I use the chrono library to measure the time between two time points, the time duration, in seconds, is around 2.85100009e-06 which is 0.000003 This number is too low, so to move my box around the screen, I have to set the velocity to 1,000,000 which should be too big. I have ...