Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • I think it's also very probable that the programs porg has tested block while running the intended process - which logically they should do to avoid killing the machine they are running on. Commented Jul 17, 2012 at 9:37
  • Whether or not you block, the mechanism works just fine. If you block, you sleep the time left after blocking. If you dont block, then your timing thread or process is sleeping while the other is working. Either way, same result. Commented Jul 17, 2012 at 16:24
  • @tylerl: How would the concrete command line look like for your solution? Commented Jul 23, 2012 at 22:39
  • I guess you meant the same like @lynxlynxlynx Commented Jul 23, 2012 at 23:13
  • @porg you need to use date +%S.%N to get the number of seconds with sub-second precision, and usleep to sleep with sub-second precision, but after that it's just a matter of math. Commented Jul 24, 2012 at 5:10