mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user