Skip to content

Commit

Permalink
Add total processing time
Browse files Browse the repository at this point in the history
  • Loading branch information
selesnow authored Dec 22, 2017
1 parent 303a829 commit ca66724
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/fbGetMarketingStat.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fbGetMarketingStat <-
interval = "day",
console_type = "progressbar",
access_token = NULL){
#Check start time
start_time <- Sys.time()

#Создаём результирующий дата фрейм
result <- data.frame()
Expand Down Expand Up @@ -181,6 +183,7 @@ fbGetMarketingStat <-
packageStartupMessage(paste0("Loaded ",nrow(result)," rows."), appendLF = T)
packageStartupMessage(paste0("Sended ",request_counter," API requests."), appendLF = T)
if(error_counter > 0) packageStartupMessage(paste0(error_counter," error request."), appendLF = T)
packageStartupMessage(paste0("Total processing time ",round(difftime(Sys.time(), start_time, units = "secs"), 0) ," seconds."), appendLF = T)
packageStartupMessage("-----------------------------------------------------", appendLF = T)
return(result)
}

0 comments on commit ca66724

Please sign in to comment.