Support folly::getCurrentThreadID() without PThread
[folly.git] / folly / stop_watch.h
index bc01935a8a0156829ca8eed9a7717fe37eb5f64d..dbdafac132302906a1737abc5d1523c8fd7a14ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -271,6 +271,13 @@ struct custom_stop_watch {
     return true;
   }
 
+  /**
+   * Returns the current checkpoint
+   */
+  typename clock_type::time_point getCheckpoint() const {
+    return checkpoint_;
+  }
+
  private:
   typename clock_type::time_point checkpoint_;
 };