Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timer long time getElapsedTime problem #390

Closed
byazrail opened this issue Feb 2, 2017 · 1 comment
Closed

timer long time getElapsedTime problem #390

byazrail opened this issue Feb 2, 2017 · 1 comment

Comments

@byazrail
Copy link
Contributor

byazrail commented Feb 2, 2017

Hi guys,

cli use timer 10 mins or large execution process execution time result 1;
example result;
[##########] 100% Complete
parser is finished...
parser is total execution time : 1
[##########] 100% Complete
Finished...
Total execution time : 0,7284
Finished...
Total execution time : 1

use type;
process function;
timer(FUNCTION);

// codes...

call another function {
in function use another timer sample function name parser
timer(FUNCTION);
// codes...
timer(FUNCTION);
$execution_time = timer()->getElapsedTime(FUNCTION);
CLI::write('parser is Finished...', 'green');
CLI::write('parser total execution time : ' . $execution_time, 'blue');
}

$execution_time = timer()->getElapsedTime(FUNCTION);
CLI::write('Finished...', 'green');
CLI::write('Total execution time : ' . $execution_time, 'blue');

have a nice day

@lonnieezell
Copy link
Member

Hmm. Unable to recreate locally. I've written some new tests that should account for your use case, and they all pass.

Your example is a little confusing to me so let me know if I didn't test the right thing. The first thing I see from your code is that you're not passing a string to the timer() function, but appear to be passing a constant. Depending on what that evaluates to, that could be causing an issue.

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

No branches or pull requests

2 participants