1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 26 unchanged lines hidden (view full) --- 35} 36 37sc_core::sc_time 38tlm_global_quantum::compute_local_quantum() 39{ 40 if (m_global_quantum != sc_core::SC_ZERO_TIME) { 41 const sc_core::sc_time current = sc_core::sc_time_stamp(); 42 const sc_core::sc_time g_quant = m_global_quantum; |
43 return sc_core::sc_time::from_value( 44 g_quant.value() - (current.value() % g_quant.value())); |
45 } else { 46 return sc_core::SC_ZERO_TIME; 47 } 48} 49 50} // namespace tlm |