Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

go back to v1356

  • Loading branch information...
commit cae571619697db3e6b3178792efc6aa8da02c65a 1 parent b5c720a
Frederic Ye authored

Showing 2 changed files with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 1  Makefile
  2. +2 2 src/main.opa
2  Makefile
@@ -3,7 +3,7 @@
3 3 OPA ?= opa
4 4 OPA_PLUGIN ?= opa-plugin-builder
5 5 OPA_OPT ?= --parser js-like
6   -MINIMAL_VERSION = 1395
  6 +MINIMAL_VERSION = 1356
7 7 EXE = opa_chat.exe
8 8
9 9 all: $(EXE)
4 src/main.opa
@@ -63,6 +63,7 @@ database intmap(message) /history
63 63
64 64 exposed Network.network(network_msg) room = Network.cloud("room")
65 65 private reference(intmap(user)) users = ServerReference.create(IntMap.empty)
  66 +private launch_date = Date.now_gmt()
66 67
67 68 /** Connection **/
68 69
@@ -87,7 +88,7 @@ _ = Network.observe(server_observe, room)
87 88
88 89 // Compute uptime and memory usage (MB)
89 90 server function compute_stats() {
90   - uptime = Date.between(System.gmt_launch_date, Date.now_gmt())
  91 + uptime = Date.between(launch_date, Date.now_gmt())
91 92 mem = System.get_memory_usage()/(1024*1024)
92 93 (uptime, mem)
93 94 }
@@ -345,6 +346,5 @@ url_parser = parser {
345 346 Server.start(Server.http, [
346 347 { resources : @static_resource_directory("resources") }, // include resources directory
347 348 { register : ["/resources/css/style.css"] }, // include CSS in headers
348   - { register : {favicon:[{format:{gif}, path:"/resources/img/favicon.gif"}]} }, // include favicon in headers
349 349 { custom : url_parser } // URL parser
350 350 ])

0 comments on commit cae5716

Please sign in to comment.
Something went wrong with that request. Please try again.