New answers tagged

2

I'm assuming you're referring to the 11-minute clock updates in Linux. If you want to keep ntpd running without updating the hardware clock, it appears the only viable option is to rebuild your kernel without the RTC_SYSTOHC option: Set the RTC time based on NTP synchronization If you say yes here, the system time (wall clock) will be stored ...


0

Try moving your command into a script like this filename: timer_script.sh #!/bin/bash start_time=$(date +%s) # your command you want to time mv /source/TEST/perf/delta1/* /destination/TEST/perf/delta2/ end_time=$(date +%s) (( elapsed = end_time - start_time )) echo "time taken: $elapsed seconds" to run it: chmod +x timer_script.sh then ...


1

@ulrichschwarz is right. The performance tests should not run both processes in parrallel. ---- You could use time which is a shell keyword. On my debian box there is also a binary in the PATH which has more option. In that case, \time needs to be used to run the binary version. There is no explicit fork. I mean the shell does everything for you when a ...


4

Use the time keyword instead of the external command. Using the keyword allows you to run time on any shell command, including function calls, not just on running a program. You can control the output format to some extent through the TIMEFORMAT variable. TIMEFORMAT=%2U time run_eclipse_on … echo "$i::$stat" The time output gets printed on its own line, ...


0

It sounds like you want something like this: #!/bin/bash for f in "$1"/*; do time eclipse -b col_solve.pl -e "$f" | tail -n 1 done Don't use functions in shell scripts unless you actually need them. The benefit of using shell scripting at all is that you can easily orchestrate other tools. Let the tools do the work, not the shell. Just use the shell ...


-1

While not the same as "user time", if elapsed time will suffice, another option is to save the start and end times and compute the time elapsed in your function call. The timer function listed here makes this easier. Reproducing the function here for easier reference: # Elapsed time. Usage: # # t=$(timer) # ... # do something # printf 'Elapsed time: ...


0

The short answer is either always use UTC as your timezone for all devices accessing the media or don't use FAT32 but NTFS or similar for your removable media : The way Windows and Linux store timestamps differ, and there are intractable problems due to the fact a file timestamp is stored in local time but the timezone is not stored. See ...


2

In "Bash Get Time", they describe the arguments to date command. screen uses a similar format, but the arguments are different. Check out the "String Escapes" section of the manual (also available in the man page) for details. As far as I can see, there's no way to achieve what you want. Perhaps seconds (%s) will suffice?



Top 50 recent answers are included