Service Time
from time import Time
| Port Name | Location | Protocol | Interfaces |
|---|---|---|---|
| ip | local | TimeInterface |
List of Available Interfaces
TimeInterface
| Operation Name | Input Type | Output Type | Faults | Description |
|---|---|---|---|---|
| cancelTimeout | long | bool | - | It Cancels a timeout from a long-value created from #scheduleTimeout |
| getCurrentDateTime | CurrentDateTimeRequestType | string | - | It returns the current date time as a string |
| getCurrentDateValues | void | DateValuesType | - | Returns the current date split in three fields: day, month and year |
| getCurrentTimeMillis | void | long | - | Warning: this is temporary and subject to future change as soon as long is supported by Jolie. |
| getDateDiff | DiffDateRequestType | int | - | |
| getDateTime | GetDateTimeRequest | GetDateTimeResponse | - | It returns a date time in a string format starting from a timestamp |
| getDateTimeValues | GetTimestampFromStringRequest | DateTimeType | InvalidDateundefined | |
| getDateValues | DateValuesRequestType | DateValuesType | InvalidDateundefined | Converts an input string into a date expressed by means of three elements: day, month and year. The request may specify the date parsing format. See #DateValuesRequestType for details. |
| getTimeDiff | GetTimeDiffRequest | int | - | |
| getTimeFromMilliSeconds | int | TimeValuesType | - | |
| getTimeValues | string | TimeValuesType | - | |
| getTimestampFromString | GetTimestampFromStringRequest | long | InvalidTimestampundefined | |
| scheduleTimeout | ScheduleTimeOutRequest | long | InvalidTimeUnitundefined | Schedules a timeout, which can be cancelled using #cancelTimeout from the returned string. Default .timeunit value is MILLISECONDS, .operation default is "timeout". |
| setNextTimeout | SetNextTimeOutRequest | - | - | it sets a timeout whose duration is in milliseconds and it is represented by the root value of the message When the alarm is triggered a message whose content is defined in .message is sent to operation defined in .operation ( default: timeout ) |
| setNextTimeoutByDateTime | undefined | - | - | |
| setNextTimeoutByTime | undefined | - | - | |
| sleep | int | void | - | It waits for a period specified in the request (in milliseconds) |
| stopNextTimeout | void | - | - | It stops the current timeout previously set with a setNextTimeout |
Types
DateTimeType:
Type Declaration
void {
month[1,1]: int //
hour[1,1]: int //
year[1,1]: int //
day[1,1]: int //
minute[1,1]: int //
second[1,1]: int //
}
DateValuesType: WARNING: work in progress, the API is unstable.
Type Declaration
void {
month[1,1]: int //
year[1,1]: int //
day[1,1]: int //
}
DiffDateRequestType:
Type Declaration
void {
format[0,1]: string //
date2[1,1]: string //
date1[1,1]: string //
}
GetDateTimeResponse:
Type Declaration
string {
month[1,1]: int //
hour[1,1]: int //
year[1,1]: int //
day[1,1]: int //
minute[1,1]: int //
second[1,1]: int //
}
GetTimestampFromStringRequest:
Type Declaration
string {
format[0,1]: string //
language[0,1]: string //
}
ScheduleTimeOutRequest:
Type Declaration
int {
message[0,1]: undefined //
operation[0,1]: string //
timeunit[0,1]: string //
}
SetNextTimeOutRequest:
Type Declaration
int {
message[0,1]: undefined //
operation[0,1]: string //
}