TekWarfare
New Member
- Joined
- Oct 24, 2017
- Messages
- 2
I really don't know how to word the title
Task:
I have a column of frames (1, 2, 3,...) and a column of time elapsed (33.835, 59.944, 85.267,...)ms.
I would like to count the number of frames every second, i.e. average FPS.
Attempt (vague pseudo code):
Start at cell B2, move down a cell to B3 and calculate the difference in time elapsed (B3-B2), if it isn't 1000ms move down to the next cell, B4, and calculate difference in "time elapsed" (B4-B2) and so on.
Once the difference in time elapsed is 1000ms, the difference in frames between the starting cell B2 and ending cell, say B39, is calculated (A39-A2) and output in an adjacent column.
Problems:
The difference in time elapsed will rarely be one second (1000ms) exactly so the formula would need to determine which cell gives the closest value to 1000ms, say cell B38 or B39.
The formula needs to perform this again starting from the last cell, i.e. now we start from B39 and do the same again.
I don't know how to code this, all I know is that it needs an IF statement, but I don't really know what I'm doing.
Data:
Google Sheets: https://docs.google.com/spreadsheets/d/1Nn6EaxpgMCEve0tCpmFnENPYmIMcU-g5tZnw81XqEvA
Any help greatly appreciated.
Task:
I have a column of frames (1, 2, 3,...) and a column of time elapsed (33.835, 59.944, 85.267,...)ms.
I would like to count the number of frames every second, i.e. average FPS.
Attempt (vague pseudo code):
Start at cell B2, move down a cell to B3 and calculate the difference in time elapsed (B3-B2), if it isn't 1000ms move down to the next cell, B4, and calculate difference in "time elapsed" (B4-B2) and so on.
Once the difference in time elapsed is 1000ms, the difference in frames between the starting cell B2 and ending cell, say B39, is calculated (A39-A2) and output in an adjacent column.
Problems:
The difference in time elapsed will rarely be one second (1000ms) exactly so the formula would need to determine which cell gives the closest value to 1000ms, say cell B38 or B39.
The formula needs to perform this again starting from the last cell, i.e. now we start from B39 and do the same again.
I don't know how to code this, all I know is that it needs an IF statement, but I don't really know what I'm doing.
Data:
Google Sheets: https://docs.google.com/spreadsheets/d/1Nn6EaxpgMCEve0tCpmFnENPYmIMcU-g5tZnw81XqEvA
Any help greatly appreciated.