File: cycle-time

package info (click to toggle)
libhinawa 4.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 540 kB
  • sloc: ansic: 1,901; python: 690; javascript: 5; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 415 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3

from sys import exit
from errno import ENXIO

from helper import test_struct

import gi
gi.require_version('Hinawa', '4.0')
from gi.repository import Hinawa

target_type = Hinawa.CycleTime
methods = (
    'new',
    'get_system_time',
    'get_clock_id',
    'get_fields',
    'get_raw',
    'compute_tstamp',
    'parse_tstamp',
)

if not test_struct(target_type, methods):
    exit(ENXIO)