src/main/java/org/intellimate/izou/sdk/frameworks/presence/resources/LastEncountered.java
@SuppressWarnings("unused")
    public static Optional<Long> getTimePassed(EventModel eventModel) {
        if (eventModel.getListResourceContainer().containsResourcesFromSource(ID)) {
            return eventModel
                    .getListResourceContainer()
                    .provideResource(ID)
                    .stream()
                    .map(ResourceModel::getResource)
                    .filter(ob -> ob instanceof Long)
                    .map(ob -> (Long) ob)
                    .findAny();
        } else {
            return Optional.empty();
        }
    }
@SuppressWarnings("unused")
    public static Optional<Long> getTimePassed(EventModel eventModel) {
        if (eventModel.getListResourceContainer().containsResourcesFromSource(ID)) {
            return eventModel
                    .getListResourceContainer()
                    .provideResource(ID)
                    .stream()
                    .map(ResourceModel::getResource)
                    .filter(ob -> ob instanceof Long)
                    .map(ob -> (Long) ob)
                    .findAny();
        } else {
            return Optional.empty();
        }
    }
@ SuppressWarnings ( "unused" ) public static Optional < Long > getTimePassed ( EventModel eventModel ) { if ( eventModel . getListResourceContainer ( ) . containsResourcesFromSource ( ID ) ) { return eventModel . getListResourceContainer ( ) . provideResource ( ID ) . stream ( ) . map ( ResourceModel :: getResource ) . filter ( ob -> ob instanceof Long ) . map ( ob -> ( Long ) ob ) . findAny ( ) ; } else { return Optional . empty ( ) ; } }
returns the time passed if available
@param eventModel the event
@return the optional long
returns the time passed if available