So I want to understand changes in the perception of time
I was wondering if I can use the standard clock module to write a function that displays the actual time right next to a clock that you can change by adding percentages or real values (seconds minutes etc) it would include a notepad function that you can write notes for each change
There is no standard library module called
If you meant standard library modules like
datetime: of course you can measure elapsed time, use math to calculate a different simulated amount of elapsed time, and then figure out what day and time it would be after the simulated amount of time had elapsed. However, you will have to do that math yourself.
Sure you can! Here’s how I would recommend going about it:
- Start by building yourself a basic clock app - one that ticks at the normal rate. Get that working to your satisfaction before building onto it.
- Create a second, independent, clockface using mostly the same code.
- Define the second clockface to have a “basis time”, a “time offset”, and a “factor”. The basis time is always the time when your app started; the offset starts at zero and the factor at 1 (or 100%, if you prefer).
- Add and subtract time by adjusting the offset. Add and subtract percentages by adjusting the factor.
It shouldn’t be TOO hard to get a clock that ticks at a different rate, or any other change you want to do; it’s what’s sometimes called a SMOP - a “simple matter of programming” - or in other words, “anything can be done, but everything costs dev hours”.
Have fun with it!