daemon: dev-mocktime command

Useful for precise timing control for testing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:45:28 +10:30
parent f3c5aa7634
commit a3e3f83d9f
9 changed files with 81 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
* Helper to submit via JSON-RPC and get back response.
*/
#include "configdir.h"
#include "controlled_time.h"
#include "json.h"
#include "version.h"
#include <ccan/err/err.h>
@@ -39,6 +40,11 @@ static void tal_freefn(void *ptr)
tal_free(ptr);
}
struct timeabs controlled_time(void)
{
return time_now();
}
int main(int argc, char *argv[])
{
int fd, i, off;