Skip to content

Commit 70e2ab9

Browse files
added get_timers to make a vector of timers that all start at the same origin. #156
1 parent 732db7c commit 70e2ab9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inst/include/Rcpp/Benchmark/Timer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ namespace Rcpp{
121121
out.attr("names") = names;
122122
return out;
123123
}
124+
125+
static std::vector<Timer> get_timers(int n){
126+
return std::vector<Timer>( n, Timer() ) ;
127+
}
124128

125129
private:
126130
typedef std::pair<std::string,nanotime_t> Step;

0 commit comments

Comments
 (0)