unsigned int time_ms;
enum target_timer_type type;
bool removed;
- struct timeval when;
+ int64_t when; /* output of timeval_ms() */
void *priv;
struct target_timer_callback *next;
};
* a synchronous command completes.
*/
int target_call_timer_callbacks_now(void);
+/**
+ * Returns when the next registered event will take place. Callers can use this
+ * to go to sleep until that time occurs.
+ */
+int64_t target_timer_next_event(void);
struct target *get_target_by_num(int num);
struct target *get_current_target(struct command_context *cmd_ctx);
extern bool get_target_reset_nag(void);
+#define TARGET_DEFAULT_POLLING_INTERVAL 100
+
#endif /* OPENOCD_TARGET_TARGET_H */