Skip to content

Conversation

brendan-w
Copy link

The commandLine project generator was reporting large, negative elapsed times:

[notice ] -----------------------------------------------
[notice ] setting OF path to: /home/brendan/of_v0.9.3_linux64_release/
[notice ] from -o option
[notice ] target platform is: linux64
[notice ] updating project /home/brendan/of_v0.9.3_linux64_release/apps/myApps/test
[notice ] saving addons.make
[notice ] project updated! 
[notice ] -----------------------------------------------

1 project updated [notice ] in -8528.8 seconds

This was due to the fact that OF's start time values are being set in this call to initutils() after the start time had been recorded. Since these calls were so close together, I thought it simplest to use only one ofGetElapsedTimef(), and let initutils() mark the start time for us.

The project generator now outputs:

[notice ] -----------------------------------------------
[notice ] setting OF path to: /home/brendan/of_v0.9.3_linux64_release/
[notice ] from -o option
[notice ] target platform is: linux64
[notice ] updating project /home/brendan/of_v0.9.3_linux64_release/apps/myApps/test
[notice ] saving addons.make
[notice ] project updated! 
[notice ] -----------------------------------------------


1 project updated [notice ] in 0.218913 seconds

previously, ofGetElapsedTimef() was being used twice, with the two
values being subtracted. This is incorrect, since the call to
of::priv::initutils() will zero the internal time counter for us.
@arturoc
Copy link
Member

arturoc commented May 30, 2019

Closing this since another simpler solution was merged already

@arturoc arturoc closed this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants