end Session
Ends the current scrolling session and saves the duration.
This method should be called when the user stops scrolling or switches to a different app. It calculates the session duration and updates both the per-app and total scroll times for the current day in SharedPreferences.
Parameters
ctx
Application context for accessing SharedPreferences
end At
Timestamp when the session ended (defaults to current time)