Skip to content

Questions about Timer implementation ‘Timer::reset()’ #49

Description

@whalexl

Hello,
I'm currently using libOTe and reviewing the Timer implementation in cryptoTools/Common/Timer.cpp. I have a question about the logic in Timer::reset():

 void Timer::reset()
    {
        setTimePoint("__Begin__");
        mTimes.clear();
    }

It appears that:

  1. A "Begin" timepoint is added via setTimePoint(),
  2. But then immediately cleared by mTimes.clear().

I believe the intended behavior is to keep "Begin" as the initial reference point after reset. If so, should the order be reversed? I'm not sure whether this is a logic bug or an intentional design choice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions