Skip to content

Commit

Permalink
added script to work out time difference as well as set all time chan…
Browse files Browse the repository at this point in the history
…ges to 0
  • Loading branch information
alexvillr committed Oct 24, 2023
1 parent 16ffaa4 commit 7c6abf8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
7 changes: 0 additions & 7 deletions time-dilation/time.c

This file was deleted.

18 changes: 7 additions & 11 deletions time-dilation/time.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
REAL_START = 17
REAL_END = 20
FAKE_START = 5
FAKE_END = 22.5
if __name__ == "__main__":
time_now = input('what time is it now (hh:mm): ').split(':')
time_new = input('what time should it be (hh:mm): ').split(':')

def in_minutes(hours):
return(hours * 60)
time_now = (int(time_now[0]) * 60) + int(time_now[1])
time_new = (int(time_new[0]) * 60) + int(time_new[1])

if __name__ == "__main__":
real_length = in_minutes(REAL_END) - in_minutes(REAL_START)
fake_length = in_minutes(FAKE_END) - in_minutes(FAKE_START)
time_diff = time_new - time_now

minutes_per_minute = fake_length / real_length
print(minutes_per_minute)
print(time_diff * 60)
2 changes: 1 addition & 1 deletion time_change.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
60
0

0 comments on commit 7c6abf8

Please sign in to comment.