mn8 Language Reference | Index    

System

SUMMARY: NO ATTRIBUTES  NO ELEMENTS  NO CONSTRUCTORS  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  NO ELEMENTS  NO CONSTRUCTORS  NO OPERATORS  METHOD DETAILS

Description

The System concept contains several useful methods. It cannot be instantiated.

Usage

        print System.getMN8Version
        print System.getMN8Info

        print "Free memory : ", System.getFreeMemory / 1024 , " K"
        print "Total memory: ", System.getTotalMemory / 1024 , " K"

        print "There are : ", System.getCurrentTime , " milliseconds since 1/1/1970"

        $i = System.getCurrentTime
        System.pause(20)
        print System.getCurrentTime - $i
      -- The result is :
        0.6a
        MN8 Ver. 0.6a [ http://mappa.mundi.net/spacemapper/ ]
        Free memory : 26985.21 K
        Total memory: 30528.0 K
        There are : 1022681712303 milliseconds since 1/1/1970
        20
        

Version: 0.1
Authors:Remus Pereni (http://neuro.nolimits.ro)
Location:
Inherits: Concept

Method List

static IntegergetCurrentTime
static IntegergetFreeMemory
static StringgetMN8Info
static StringgetMN8Version
static IntegergetTotalMemory
static pause (Integer $millis)
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI

Detailed Method Info

static getCurrentTime
Returns: Integer

Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

            print System.getCurrentTime
            -- the result is --
            1028223202844
            

top
static getFreeMemory
Returns: Integer

Returns an approximation to the total amount of memory currently available for future allocated concept instances, measured in bytes.

            print System.getFreeMemory
            -- the result is --
            28369656
            

top
static getMN8Info
Returns: String

Returns a string which identifies the current MN8 release.

            print System.getMN8Info
            -- the result is --
            MN8 Ver. 0.7a [ http://mappa.mundi.net/spacemapper/ ]
            

top
static getMN8Version
Returns: String

Returns the version string of this MN8 release.

            print System.getMN8Version
            -- the result is --
            0.7a
            

top
static getTotalMemory
Returns: Integer

Returns the total amount of memory currently available for current and future objects, measured in bytes.

            print System.getTotalMemory
            -- the result is --
            31260672
            

top
static pause (Integer $millis)
Parameters:
$millis :the length of time to sleep in milliseconds.
Returns:

Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds.

If the millis parameter is 0 (zero) then it will sleep till the user presses an Enter

            each $x in 0..20 do [                                                           
              print $x                                                                      
              System.pause(1000)                                                            
            ]
            -- the result is --
            0
            1
            2
            3
            ...
            

top