Skip to content

Layering violation - elapsedtime depends on timelib #82

Description

@ejpilger

elapsedtime.cpp (conceptually Layer 1 / CORE UTILITIES) calls currentmjd() which is declared in timelib.h (Layer 2 / DATA I/O). This is a one-way upward dependency, not circular — timelib has no reference to elapsedtime. Both are currently bundled into the same CosmosTime CMake target as a workaround.

Fix: Extract currentmjd() (and its double offset variant) into a new support/timebase.h at Layer 1 with a corresponding timebase.cpp. Both elapsedtime and timelib include timebase.h. The CosmosTime CMake target can then be split into CosmosTimeBase (Layer 1) and CosmosTime (Layer 2) if desired.

Files: support/elapsedtime.cpp:292, support/timelib.h:137-138, support/CMakeLists.txt:30

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions