XintRange range;
Object data_group;
Widget edit;
...
range.start = time((long *) 0L);
range.increment = 1;
/* Create a Date label object */
XtVaCreateWidget ("Real Time",
(WidgetClass)xintDataTimeLabelObjectClass,
edit,
XmNtimeBase, time((long *) 0L),
XmNtimeMeasure, XintTIME_SECOND,
XmNtimeLabelFormat, "%H:%M:%S",
XmNsampledRange, &range,
XmNlabelOrientation, XintLABEL_X,
XmNdataGroup, data_group, NULL);
| Name | Type | Default | Access |
|---|---|---|---|
| XmNtimeBase | int | 0 | CSG |
| XmNtimeMeasure | int | XintTIME_SECOND | CSG |
| XmNtimeLabelFormat | char * | dynamic | CSG |
| Resource Value | Description |
|---|---|
| XintTIME_SECOND | Time is measured in seconds. |
| XintTIME_MINUTE | Time is measured in minutes. |
| XintTIME_HOUR | Time is measured in hours. |
| XintTIME_DAY | Time is measured in days. |
| XintTIME_MONTH | Time is measured in months. |
| XintTIME_YEAR | Time is measured in years. |
%a locale's abbreviated weekday name
%A locale's full weekday name
%b locale's abbreviated month name
%B locale's full month name
%d day of the month [1,31]; single digits are preceded by 0
%D date as %m/%d/%y
%e day of the month [1,31]; single digits are preceded by a
space
%h locale's abbreviated month name
%H hour (24-hour clock) [0,23]; single digits are preceded by 0
%m month number [1,12]; single digits are preceded by 0
%M minute [00,59]; leading zero is permitted but not required
%n insert a newline
%p locale's equivalent of either a.m. or p.m.
%y year within century [00,99]
%Y year, including the century (for example 1993)