Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, please could anybody help me out with this. I want to run a program written in C++ on debian for specific period of time using the command ./phad 1200 ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    5

    help! simulation on debian

    Hi, please could anybody help me out with this. I want to run a program written in C++ on debian for specific period of time using the command

    ./phad 1200 in3* |sort +0 -45 -r >phad.sim

    However i discovered that whenever i specify a period of time for it to run, i runs for just 90secs defaultly for any period f time i specify. Cold anyone pls give me a clue of what his wrong.


    the Phad is the compiled source code, 1200 in secs is the specified time and the phad.sim his the output extension file.



    thank u.

  2. #2
    Just Joined!
    Join Date
    Jan 2008
    Posts
    53

    sleep function

    $ sleep 1200; ./phad in3* |sort +0 -45 -r >phad.sim

    The OS has already an sleep function.

    Just modify your function and do not pass the time to your application and run an sleep before.

    see "man sleep" for more details
    Last edited by rojoblandino; 11-11-2009 at 08:38 PM. Reason: Adding details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •