timer

Solutions on MaxInterview for timer by the best coders in the world

showing results for - "timer"
Chahine
23 Mar 2020
1gotta keep track of how long my breaks are lol
Aqua
10 Jan 2019
1import time
2def converter(hours, minutes, seconds):
3  return hours * 3600 + minutes * 60 + seconds
4time.sleep(converter(hrs, mins, secs))
5print("time's up")
Yannik
11 Jan 2021
1get back to working and dont procrastinate
Isabel
06 Jul 2016
1import time
2import sys
3time_left = int(input("How long would you like the timer to go (in seconds)? "))
4check_for_decimal = time_left % 1
5
6if check_for_decimal not 0:
7  print("Use a whole number pls")
8  sys.exit()
9  
10if time_left < 1:
11  print("Please use a number greater than 0.")
12  sys.exit()
13
14while True:
15  time.sleep(1)
16  time_left -= 1
17  if time_left == 0:
18    print("Time's up!")
19    break
20    
21# Since I'm such a good programmer (/s), I didn't test this at all :)
22# Let me know if there is an error and I will try to fix it.
Pia
02 Jul 2016
1import time
2length = int(input('How many seconds: '))
3time.sleep(length)
4print('Time is up')
Daniela
12 Apr 2017
1const oldDate = Date.parse("4/10/2020, 12:00:00");
2
3const timeBetweenDates = (date1, date2) => {
4  const date = new Date(date1 - date2);
5  return {
6    years: date.getYear() - 70,
7    months: date.getMonth(),
8    days: date.getDay(),
9    hours: date.getHours(),
10    minutes: date.getMinutes(),
11    seconds: date.getSeconds(),
12  }
13}
14
15const pre = document.getElementById("display");
16setInterval(() => {
17  pre.textContent = JSON.stringify(timeBetweenDates(Date.now(), oldDate), 0, 2);
18}, 1000);
Luciano
28 Sep 2017
1# Python code to make timer
2from time import sleep
3
4delay = input("How long do you want to set the timer for?  ")
5sleep(delay)
6print("Times Up!")
Leo
07 Mar 2018
1greppers use timer?  uwu
Jakob
12 Jul 2019
1Rubik's cube:
2First place: 4m 26s 08 
Lilli
25 Jan 2017
1DREAM
2DREAAAAM
3DREAAAAAAAAMMM
4DREEEEAAAM
queries leading to this page
timer 5ctimertimer 27timer