Skip to content

Add time system: TimeSource, Timestamp, UptimeTimeSource, DispatchTimeScheduler#7

Merged
Kyle-Ye merged 4 commits intomainfrom
feature/timesource
Apr 12, 2026
Merged

Add time system: TimeSource, Timestamp, UptimeTimeSource, DispatchTimeScheduler#7
Kyle-Ye merged 4 commits intomainfrom
feature/timesource

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Contributor

@Kyle-Ye Kyle-Ye commented Apr 12, 2026

Summary

  • Add LocationContaining protocol with CGPoint/Never conformances
  • Add Duration.asTimeInterval() and Duration.max extensions
  • Add TimeSource, TimeSourceImpl protocols
  • Add Timestamp struct with full arithmetic operators (+, -, +=, -=)
  • Add UptimeTimeSource using clock_gettime_nsec_np(CLOCK_UPTIME_RAW)
  • Add TimeScheduler protocol, TimeSchedulerToken, ScheduledJob
  • Add DispatchTimeScheduler with cancel-safety (isCancelled check)
  • Add GestureUpdateDriver protocol and RunLoopUpdateDriver (CFRunLoop-based)
  • All implementations audited against Gestures.framework binary

Test plan

  • 60 compatibility tests pass on iPhone 17 Pro (iOS 26.2 Simulator)
  • OG unit tests pass locally
  • Companion PR: OpenSwiftUIProject/DarwinPrivateFrameworks#TBD

Kyle-Ye added 4 commits April 13, 2026 00:28
- Add LocationContaining protocol with CGPoint/Never conformances
- Add Duration.asTimeInterval() and Duration.max
- Add abstract method / unreachable / empty stub helpers
- Update GestureTrait to use Duration.asTimeInterval()
- Remove unused CoreGraphicsAdditions.swift
@Kyle-Ye Kyle-Ye merged commit 13351fe into main Apr 12, 2026
1 of 4 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/timesource branch April 12, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant