Skip to content

Instantly share code, notes, and snippets.

Avatar
💚
Tasks for elementary OS

Marco Betschart marbetschar

💚
Tasks for elementary OS
View GitHub Profile
@marbetschar
marbetschar / 201001 - How to avoid time offsets caused by hibernation.md
Last active Oct 1, 2020
Vala: How to avoid time offsets caused by hibernation
View 201001 - How to avoid time offsets caused by hibernation.md

Vala: How to avoid time offsets caused by hibernation

Use the prepare_for_sleep signal to calculate the time between suspend and resume.

Credits to @vjr for this tip!

How to run this code

  1. Install Vala Tester from elementary AppCenter
  2. Copy & paste all of the below code snippets in Vala Tester's code view