Answers for "timer"

7

timer

gotta keep track of how long my breaks are lol
Posted by: Guest on February-28-2021
1

timer

import time
def converter(hours, minutes, seconds):
  return hours * 3600 + minutes * 60 + seconds
time.sleep(converter(hrs, mins, secs))
print("time's up")
Posted by: Guest on August-12-2021
2

timer

get back to working and dont procrastinate
Posted by: Guest on September-16-2021
1

timer

import time
import sys
time_left = int(input("How long would you like the timer to go (in seconds)? "))
check_for_decimal = time_left % 1

if check_for_decimal not 0:
  print("Use a whole number pls")
  sys.exit()
  
if time_left < 1:
  print("Please use a number greater than 0.")
  sys.exit()

while True:
  time.sleep(1)
  time_left -= 1
  if time_left == 0:
    print("Time's up!")
    break
    
# Since I'm such a good programmer (/s), I didn't test this at all :)
# Let me know if there is an error and I will try to fix it.
Posted by: Guest on August-30-2021
1

timer

import time
length = int(input('How many seconds: '))
time.sleep(length)
print('Time is up')
Posted by: Guest on February-07-2021
0

timer

58s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s758s7
Posted by: Guest on August-07-2021
0

timer

DREAM
DREAAAAM
DREAAAAAAAAMMM
DREEEEAAAM
Posted by: Guest on March-25-2021
0

timer

cout << "fuck me un the ass daddy" << endl;
Posted by: Guest on June-18-2021
0

timer

import React from 'react';
import { useTimer } from 'react-timer-hook';

function MyTimer({ expiryTimestamp }) {
  const {
    seconds,
    minutes,
    hours,
    days,
    isRunning,
    start,
    pause,
    resume,
    restart,
  } = useTimer({ expiryTimestamp, onExpire: () => console.warn('onExpire called') });


  return (
    <div style={{textAlign: 'center'}}>
      <h1>react-timer-hook </h1>
      <p>Timer Demo</p>
      <div style={{fontSize: '100px'}}>
        <span>{days}</span>:<span>{hours}</span>:<span>{minutes}</span>:<span>{seconds}</span>
      </div>
      <p>{isRunning ? 'Running' : 'Not running'}</p>
      <button onClick={start}>Start</button>
      <button onClick={pause}>Pause</button>
      <button onClick={resume}>Resume</button>
      <button onClick={() => {
        // Restarts to 5 minutes timer
        const time = new Date();
        time.setSeconds(time.getSeconds() + 300);
        restart(time)
      }}>Restart</button>
    </div>
  );
}

export default function App() {
  const time = new Date();
  time.setSeconds(time.getSeconds() + 600); // 10 minutes timer
  return (
    <div>
      <MyTimer expiryTimestamp={time} />
    </div>
  );
}
Posted by: Guest on September-08-2021
0

timer

console.log('This guy needs a timer')
Posted by: Guest on February-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language