LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   stop time (https://www.linuxquestions.org/questions/programming-9/stop-time-718194/)

khodeir 04-10-2009 08:24 AM

stop time
 
Hi all
I want to make a program to stop time
i.e when the program runs at startup it doesn't make the clock change
the time still steady till the program end and the clock continue
any suggestions??

Hko 04-10-2009 09:03 AM

Quote:

Originally Posted by khodeir (Post 3504565)
I want to make a program to stop time i.e when the program runs at startup it doesn't make the clock change the time still steady till the program end and the clock continue

Browse through these man-pages to get an idea how it could be done:
- man adjtime
- man settimeofday
- man clock_settime

Quote:

Originally Posted by khodeir (Post 3504565)
any suggestions??

Yes: don't.

bigearsbilly 04-11-2009 06:01 PM

you could fly your computer really fast around the earth
like superman did.

jlinkels 04-11-2009 09:07 PM

What is the purpose? I will certainly break the normal operation of your computer, so any other solution satisfactory for your program would be better.

jlinkels

quantt 04-12-2009 05:19 AM

bigearsbilly, you're kidding=) but it's not stop time on local machine, when it would be fly time not stopped, this to continuous in space. But if we're tried destroy the target system her time is stopped. Just shutdown your PC=)

khodeir 04-12-2009 12:46 PM

the problem that i have a program will expire this week and i want to stop it
this is the point

bigearsbilly 04-12-2009 02:01 PM

mad as a hatter!

how do you know it doesn't call home and check the time?

barking!

khodeir 04-12-2009 02:19 PM

I know it will but the script i need is always reset and never make the clock ticks

jlinkels 04-12-2009 04:30 PM

Well, IMHO you ought not to break your OS with stopping the time because your program expires.

Most programs that expire are programs which run legally for an amount of time, and need to be purchased or renewed after that. Isn't that simpler to do?

jlinkels

khodeir 04-12-2009 09:13 PM

but they need thousand dollars!!!!!!

jlinkels 04-12-2009 09:36 PM

So? Apparently they have invested time and money to write that program. If their choice is to sell it and control the use of it, why would be take it for free?

jlinkels

quantt 04-13-2009 04:15 AM

Quote:

Most programs that expire are programs which run legally for an amount of time, and need to be purchased or renewed after that. Isn't that simpler to do?
cool, you knew what's programms todo it?

But in serious you can use acpitool with key -s.

wje_lq 04-13-2009 04:46 AM

No matter what the solution, if the guys who wrote the program are clever, they won't allow it.

When their program is first run, they can run timing tests on some of their typical operations during otherwise idle conditions and store the results. If, later on, when a licensee (that's you) realizes that he needs to stop the clock, the program can check to see whether these same operations require much less time than anticipated; say, 80% less time. If so, shut down the program right then, and don't wait for the apparent deadline. Bury something in the license to allow this.

And I can think of one other trick you can use, not mentioned so far, that they could make similar checks for.

Just fork over the money. If you can't afford that, and if running this program is necessary for your job, quit that job and get another.

Hko 04-13-2009 03:25 PM

Quote:

Originally Posted by wje_lq (Post 3507123)
When their program is first run, they can run timing tests on some of their typical operations during otherwise idle conditions and store the results.

Then you could wipe those results (and maybe need to reinstall the demo-program)...

wje_lq 04-14-2009 12:55 AM

Quote:

Originally Posted by Hko (Post 3507682)
Then you could wipe those results (and maybe need to reinstall the demo-program)...

If they store those results directly somewhere in the program's executable, then yes, you'd have to reinstall the program. They could design the program so that to enable it, you have to call a human being and read to him the serial number. If that has to be done, then a duplicate installation from the same copy can be detected.


All times are GMT -5. The time now is 01:32 PM.