class NetSessionData {

    private static final Netapi32 NET = Netapi32.INSTANCE;

    private NetSessionData() {
    }

    public static List<OSSession> queryUserSessions() {<FILL_FUNCTION_BODY>}
}

        List<OSSession> sessions = new ArrayList<>();
        try (CloseablePointerByReference bufptr = new CloseablePointerByReference();
                CloseableIntByReference entriesread = new CloseableIntByReference();
                CloseableIntByReference totalentries = new CloseableIntByReference()) {
            if (0 == NET.NetSessionEnum(null, null, null, 10, bufptr, Netapi32.MAX_PREFERRED_LENGTH, entriesread,
                    totalentries, null)) {
                Pointer buf = bufptr.getValue();
                SESSION_INFO_10 si10 = new SESSION_INFO_10(buf);
                if (entriesread.getValue() > 0) {
                    SESSION_INFO_10[] sessionInfo = (SESSION_INFO_10[]) si10.toArray(entriesread.getValue());
                    for (SESSION_INFO_10 si : sessionInfo) {
                        // time field is connected seconds
                        long logonTime = System.currentTimeMillis() - (1000L * si.sesi10_time);
                        sessions.add(new OSSession(si.sesi10_username, "Network session", logonTime, si.sesi10_cname));
                    }
                }
                NET.NetApiBufferFree(buf);
            }
        }
        return sessions;
    
<no_super_class>