From 004b7da02857a065f205ccc4fe4fe212b8200562 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 26 Nov 2024 12:26:17 +0100 Subject: [PATCH] .. --- python/sdist/amici/__init__.py | 2 +- swig/modelname.template.i | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/sdist/amici/__init__.py b/python/sdist/amici/__init__.py index 1b6d789fdd..f08d9e9349 100644 --- a/python/sdist/amici/__init__.py +++ b/python/sdist/amici/__init__.py @@ -216,7 +216,7 @@ def import_model_module( "Python kernel." ) # this is the right file, but did it change on disk? - t_imported = m.get_import_time() + t_imported = m._get_import_time() # noqa: protected-access t_modified = os.path.getmtime(m.__file__) if t_imported < t_modified: t_imp_str = datetime.datetime.fromtimestamp(t_imported).isoformat() diff --git a/swig/modelname.template.i b/swig/modelname.template.i index a95c254843..d7aab8ed8a 100644 --- a/swig/modelname.template.i +++ b/swig/modelname.template.i @@ -14,13 +14,13 @@ using namespace amici; #include static std::chrono::time_point _module_import_time; -static double get_import_time() { +static double _get_import_time() { auto epoch = _module_import_time.time_since_epoch(); return std::chrono::duration(epoch).count(); } %} -static double get_import_time(); +static double _get_import_time(); %init %{ _module_import_time = std::chrono::system_clock::now();