yusuzech/timeR

Can you add minutes and hours to precision?

Closed this issue · 4 comments

I want to time a web scraping script that runs for hours.

That's not doable because all other components in this package require the precision to be at least to second.

However, since the timeElapsed column is measured as seconds, you can use that column divided by 3600 to get hours. For example, you can manually add another column by:

my_timer$eventTable["timeElapsedHours"] = round(my_timer$eventTable["timeElapsed"]/3600,2)

I was hoping you can update the package to add hours to precision too. But thanks for the reply, what u mentioned works well too.

I was hoping you can update the package to add hours to precision too. But thanks for the reply, what u mentioned works well too.

I understand what you mean, and thanks for the suggestions. But setting precision to minutes or hours could lead to other unwanted problems. The biggest one is that all the time column won't be the standard YYYY-MM-DD HH:MM:SS format.

And you can round time to lower precision but not backward.

Not a big deal. Overall this is a very useful package!