cpc / openasip

Open Application-Specific Instruction Set processor tools (OpenASIP)
http://openasip.org
Other
143 stars 43 forks source link

Fixes deprecation warning for boost::timer #215

Closed sarahec closed 1 year ago

sarahec commented 1 year ago

The code was using boost::timer version 1 while Boost has moved to a new API. The new timer API is very similar to the one introduced in C++ 11, so I just went with C++11.

Notes:

  1. To reset the timer, just allocate a new one.
  2. To calculate elapsed time, subtract the timer from now (a new timer)
  3. Then cast the result to the desired granularity. This code is casting to seconds to match the original.
sarahec commented 1 year ago

The above changes update the formatting scripts to work today and then run them across the files. Anything else you'd like?