projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change visibility of folly::Arena constructors to public
[folly.git]
/
folly
/
futures
/
Timekeeper.h
diff --git
a/folly/futures/Timekeeper.h
b/folly/futures/Timekeeper.h
index 7bbdddc5763cd0674326558542f9a5ab47dfd915..3612f5cf796236d54e8af6bdddc4886f6fcf7147 100644
(file)
--- a/
folly/futures/Timekeeper.h
+++ b/
folly/futures/Timekeeper.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
4
Facebook, Inc.
+ * Copyright 201
5
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,9
+18,9
@@
#include <folly/futures/detail/Types.h>
#include <folly/futures/detail/Types.h>
-namespace folly {
namespace wangle {
+namespace folly {
-template <class>
struct
Future;
+template <class>
class
Future;
/// A Timekeeper handles the details of keeping time and fulfilling delay
/// promises. The returned Future<void> will either complete after the
/// A Timekeeper handles the details of keeping time and fulfilling delay
/// promises. The returned Future<void> will either complete after the
@@
-68,23
+68,23
@@
class Timekeeper {
Future<void> at(std::chrono::time_point<Clock> when);
};
Future<void> at(std::chrono::time_point<Clock> when);
};
-}
}
+}
// namespace folly
// now get those definitions
#include <folly/futures/Future.h>
// finally we can use Future
// now get those definitions
#include <folly/futures/Future.h>
// finally we can use Future
-namespace folly {
namespace wangle {
+namespace folly {
- template <class Clock>
- Future<void> Timekeeper::at(std::chrono::time_point<Clock> when) {
- auto now = Clock::now();
-
- if (when <= now) {
- return makeFuture();
- }
+template <class Clock>
+Future<void> Timekeeper::at(std::chrono::time_point<Clock> when) {
+ auto now = Clock::now();
- return after(when - now);
+ if (when <= now) {
+ return makeFuture();
}
}
-}}
+ return after(when - now);
+}
+
+} // namespace folly