I have a value such as 'timestamp' below, where the last three digits correspond to milliseconds.
timestamp = 1340830988768
I currently have code that looks like the following:
import indicate indicator = indicate.Indicator() indicator.set_property_time("time", int(timestamp[:-3]))
I want to amend it to use:
from gi.repository import Indicate indicator = Indicate.Indicator()
However, the new version of
set_property_time requires the second parameter to be a
GLib.TimeVal. How do I create a
GLib.TimeVal from my timestamp? Millisecond precision is not important for this application.