R/hello.R

#' time_to_got
#'
#'
#' @return
#' @export
#'
#' @examples
#' time_to_got()
#' for(i in seq_along(1:100)){
#'   time_to_got()
#'   print('----------')
#' }
time_to_got <- function(sound = 1) {
  td <- as.numeric(as.POSIXct('2019-04-14 21:00:00', tz = 'EST')) - as.numeric((Sys.time()))

  print(paste(td/(86400*7), 'weeks'))
  print(paste(td/86400, 'days'))
  print(paste(td/3600, 'hours'))
  print(paste(td/24, 'minutes'))
  print(paste(td, 'seconds'))

  for (i in c(0.5, 1, 0.1, 0.1, 0.5, 1, 0.1, 0.1, 0.1)){
    beepr::beep(sound = sound)
    Sys.sleep(i)
  }

  invisible()
}
g360codes/stark documentation built on May 26, 2019, 2:31 a.m.