View | Details | Raw Unified | Return to bug 1536
Collapse All | Expand All

(-)a/sim/include/sim.h (+2 lines)
 Lines 30-33    Link Here 
30
30
31
void sim_poll_event (int flag, void *context);
31
void sim_poll_event (int flag, void *context);
32
32
33
__u64 sim_starttime (void);
34
33
#endif /* SIM_H */
35
#endif /* SIM_H */
(-)a/sim/sim.c (+12 lines)
 Lines 211-216    Link Here 
211
{
211
{
212
  return g_imported.current_ns (g_kernel);
212
  return g_imported.current_ns (g_kernel);
213
}
213
}
214
__u64 sim_starttime (void)
215
{
216
  static char inited = 0;
217
  static __u64 value = 0;
218
219
  if (!inited)
220
    {
221
      value = g_imported.current_ns (0);
222
      inited = 1;
223
    }
224
  return value;
225
}
214
struct SimTaskTrampolineContext
226
struct SimTaskTrampolineContext
215
{
227
{
216
  void (*callback) (void *);
228
  void (*callback) (void *);
(-)a/sim/time.c (-1 / +1 lines)
 Lines 57-63    Link Here 
57
ktime_t ktime_get(void)
57
ktime_t ktime_get(void)
58
{
58
{
59
  u64 ns = sim_current_ns ();
59
  u64 ns = sim_current_ns ();
60
  return ns_to_ktime (ns);
60
  return ns_to_ktime (ns + sim_starttime ());
61
}
61
}
62
void ktime_get_ts(struct timespec *ts)
62
void ktime_get_ts(struct timespec *ts)
63
{
63
{

Return to bug 1536