aboutsummaryrefslogtreecommitdiffstats
path: root/gmod
AgeCommit message (Expand)AuthorFilesLines
2017-03-30Fix more "symbol XXX found in none of the libs" warningsDave Barach2-4/+4
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-1/+1
2016-07-18Add uid/gid config parameters to shared-vm database map operatorDave Barach1-1/+5
2016-07-08Remove unnecessary and obsolete configure.ac directivesDamjan Marion1-2/+1
2016-04-12Add a configurable "significant error" metricDave Barach2-2/+21
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-1/+1
2016-01-29Rationalize metric names.Dave Barach1-2/+2
2016-01-28vpp metrics upload via gmond pluginDave Barach4-0/+200
er.Long */
/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright(c) 2021 Cisco Systems, Inc.
 */

#ifndef included_vlib_time_h
#define included_vlib_time_h

#include <vlib/vlib.h>
#include <vppinfra/tw_timer_1t_3w_1024sl_ov.h>

static inline f64
vlib_time_get_next_timer (vlib_main_t *vm)
{
  vlib_node_main_t *nm = &vm->node_main;
  TWT (tw_timer_wheel) *wheel = nm->timing_wheel;
  return TW (tw_timer_first_expires_in_ticks) (wheel) * wheel->timer_interval;
}

static inline void
vlib_time_adjust (vlib_main_t *vm, f64 offset)
{
  vm->time_offset += offset;
}

#endif /* included_vlib_time_h */