Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by rwniceing
at 2024-08-28 08:13:38
Point:500 Replies:4 POST_ID:829200USER_ID:12079
Topic:
Linux;Microsoft Windows Operating Systems;Windows Batch Scripting
I have one php script which is running some simple testing code, and run it
as linux shell such as follows.
$ php mytesting.php
I know the code execution time is around 10 milli-second or 0.01 second , I know I can add php function like microtime() function to get the code running time before and after.
But I just want to know how do it in Linux script and window batch script with php mytesting.php command included ?
Please advise
Rwniceing
as linux shell such as follows.
$ php mytesting.php
I know the code execution time is around 10 milli-second or 0.01 second , I know I can add php function like microtime() function to get the code running time before and after.
But I just want to know how do it in Linux script and window batch script with php mytesting.php command included ?
Please advise
Rwniceing
Author: rwniceing replied at 2024-08-30 21:43:23
Thanks for your reply
Assisted Solution
Expert: Gerwin Jansen replied at 2024-08-29 08:57:12
250 points EXCELLENT
You should be able to do that using powershell:
Measure-Command {php mytesting.php}
Measure-Command {php mytesting.php}
Author: rwniceing replied at 2024-08-28 20:52:32
Yes, it work on linux output is
real 0m1.006s
user 0m0.575s
sys 0m0.016s
What is real, user,sys stand for. user is stand for the time running php mytesting.php
sys is stand for running time command itself ?
What is similar command for window 7 or batch script to extract the total execution time of "php mytesting.php" ?
Please advise
real 0m1.006s
user 0m0.575s
sys 0m0.016s
What is real, user,sys stand for. user is stand for the time running php mytesting.php
sys is stand for running time command itself ?
What is similar command for window 7 or batch script to extract the total execution time of "php mytesting.php" ?
Please advise
Accepted Solution
Expert: Gerwin Jansen replied at 2024-08-28 13:24:56
250 points EXCELLENT
Is it that you want to know how long the command runs under Linux? You can 'time' any command in Linux like this:
time <command>
so in your case:
time php mytesting.php
time <command>
so in your case:
time php mytesting.php