MCPcopy Create free account
hub / github.com/KLayout/klayout / timer

Method timer

src/laybasic/laybasic/layLayoutViewBase.cc:3849–3882  ·  view source on GitHub ↗

NOTE: this methods needs to be called "frequently"

Source from the content-addressed store, hash-verified

3847
3848// NOTE: this methods needs to be called "frequently"
3849void
3850LayoutViewBase::timer ()
3851{
3852 bool dirty = false;
3853 for (std::list<lay::CellView>::const_iterator i = m_cellviews.begin (); i != m_cellviews.end () && ! dirty; ++i) {
3854 dirty = (*i).is_valid () && (*i)->layout ().is_editable () && (*i)->is_dirty ();
3855 }
3856
3857 if (dirty != m_dirty) {
3858 m_dirty = dirty;
3859 emit_dirty_changed ();
3860 }
3861
3862 if (is_activated ()) {
3863
3864 if (m_prop_changed) {
3865 do_prop_changed ();
3866 m_prop_changed = false;
3867 }
3868
3869 tl::Clock current_time = tl::Clock::current ();
3870 if ((current_time - m_last_checked).seconds () > animation_interval) {
3871 m_last_checked = current_time;
3872 if (m_animated) {
3873 set_view_ops ();
3874 do_set_phase (int (m_phase));
3875 if (m_animated) {
3876 ++m_phase;
3877 }
3878 }
3879 }
3880
3881 }
3882}
3883
3884void
3885LayoutViewBase::refresh ()

Callers

nothing calls this directly

Calls 9

is_dirtyMethod · 0.80
secondsMethod · 0.80
emit_dirty_changedFunction · 0.70
currentFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
is_validMethod · 0.45
is_editableMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected