Skip to content

Instantly share code, notes, and snippets.

@dsparks
Created February 9, 2011 18:34
Show Gist options
  • Save dsparks/818977 to your computer and use it in GitHub Desktop.
Save dsparks/818977 to your computer and use it in GitHub Desktop.
to project the time at which a loop will be finished
Projector <- function(st, loopover, iteration){
Currently <- Sys.time()
Elapsed <- (Currently - st) * length(loopover)/which(iteration == loopover)
units(Elapsed) <- "mins"
return(st + Elapsed * 60)
}
StartTime <- Sys.time()
for(oo in c(1:50)){
print(oo)
print(Projector(StartTime, c(1:50), oo))
readLines("http://www.yahoo.com")
}
Sys.time()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment