[lib.context] shared context between 'client' and 'server' ; only contains the timeid window size
This commit is contained in:
parent
b23acf97f8
commit
1bb7ede29a
|
@ -0,0 +1,20 @@
|
||||||
|
package context
|
||||||
|
|
||||||
|
/* (1) Context class
|
||||||
|
---------------------------------------------------------*/
|
||||||
|
/* (1) Attributes */
|
||||||
|
type Context struct {
|
||||||
|
windowSize float64; // 'timeid' window size
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (2) Constructor */
|
||||||
|
func Create(winSize float64) *Context{
|
||||||
|
var instance = new(Context);
|
||||||
|
|
||||||
|
instance.windowSize = winSize;
|
||||||
|
|
||||||
|
return instance
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (3) Getters */
|
||||||
|
func (c Context) GetWindowSize() float64 { return c.windowSize }
|
Loading…
Reference in New Issue