• Create Account

### #ActualHodgman

Posted 17 November 2012 - 11:01 PM

You're measuring the time from the end of frame#1 to the beginning of frame #2.
A = get the time.
...spend a while doing stuff...
B = get the time
...loop for next frame...
C = get the time
time spent doing stuff previously = C-B  (wrong)
...spend a while doing stuff...
etc

You really want to be measuring the time from the start of frame#1 to the start of frame#2.
A = get the time.
...spend a while doing stuff...
...loop for next frame...
B = get the time
time spent doing stuff previously = B-A
...spend a while doing stuff...
etc

### #4Hodgman

Posted 17 November 2012 - 11:00 PM

You're measuring the time from the end of frame#1 to the beginning of frame #2.
A = get the time.
...spend a while doing stuff...
B = get the time
...next frame...
C = get the time
time spent doing stuff previously = C-B  (wrong)

You really want to be measuring the time from the start of frame#1 to the start of frame#2.
A = get the time.
...spend a while doing stuff...
...next frame...
B = get the time
time spent doing stuff previously = B-A

### #3Hodgman

Posted 17 November 2012 - 11:00 PM

You're measuring the time from the end of frame#1 to the beginning of frame #2.
A = get the time.
...spend a while doing stuff...
B = get the time
...next frame...
C = get the time
time spent doing stuff previously = C-B  (actually its C-A!)

You really want to be measuring the time from the start of frame#1 to the start of frame#2.
A = get the time.
...spend a while doing stuff...
...next frame...
B = get the time
time spent doing stuff previously = B-A

### #2Hodgman

Posted 17 November 2012 - 11:00 PM

You're measuring the time from the end of frame#1 to the beginning of frame #2.
A = get the time.
...spend a while doing stuff...
B = what's the time
...next frame...
C = get the time
time spent doing stuff previously = C-B  (actually its C-A!)

You really want to be measuring the time from the start of frame#1 to the start of frame#2.
A = get the time.
...spend a while doing stuff...
...next frame...
B = get the time
time spent doing stuff previously = B-A

### #1Hodgman

Posted 17 November 2012 - 10:59 PM

You're measuring the time from the end of frame#1 to the beginning of frame #2.
A = what's the time.
...spend a while doing stuff...
B = what's the time
...next frame...
C = what's the time
time spent doing stuff = C-B

You really want to be measuring the time from the start of frame#1 to the start of frame#2.
A = what's the time.
...spend a while doing stuff...
...next frame...
B = what's the time
time spent doing stuff = B-A

PARTNERS