Ignore:
Timestamp:
Feb 23, 2018, 11:37:54 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
566b74f
Parents:
d2887f7
Message:

Fixed preemption and changed default_preemption to use cfa_time_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/bits/cfatime.h

    rd2887f7 rd8548e2  
    4848// ctors
    4949static inline void ?{}( __cfa_time_t & this ) { this.val = 0; }
     50static inline void ?{}( __cfa_time_t & this, const __cfa_time_t & rhs ) { this.val = rhs.val; }
    5051static inline void ?{}( __cfa_time_t & this, zero_t zero ) { this.val = 0; }
    5152
     
    9293static inline __cfa_time_t from_us ( uint64_t val ) { __cfa_time_t ret; ret.val = val *         1_000ul; return ret; }
    9394static inline __cfa_time_t from_ns ( uint64_t val ) { __cfa_time_t ret; ret.val = val *             1ul; return ret; }
     95
     96static inline uint64_t to_s  ( __cfa_time_t t ) { return t.val / 1_000_000_000ul; }
     97static inline uint64_t to_ms ( __cfa_time_t t ) { return t.val /     1_000_000ul; }
     98static inline uint64_t to_us ( __cfa_time_t t ) { return t.val /         1_000ul; }
     99static inline uint64_t to_ns ( __cfa_time_t t ) { return t.val /             1ul; }
Note: See TracChangeset for help on using the changeset viewer.