Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

go back to v1356

  • Loading branch information...
commit cae571619697db3e6b3178792efc6aa8da02c65a 1 parent b5c720a
@Aqua-Ye authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  Makefile
  2. +2 −2 src/main.opa
View
2  Makefile
@@ -3,7 +3,7 @@
OPA ?= opa
OPA_PLUGIN ?= opa-plugin-builder
OPA_OPT ?= --parser js-like
-MINIMAL_VERSION = 1395
+MINIMAL_VERSION = 1356
EXE = opa_chat.exe
all: $(EXE)
View
4 src/main.opa
@@ -63,6 +63,7 @@ database intmap(message) /history
exposed Network.network(network_msg) room = Network.cloud("room")
private reference(intmap(user)) users = ServerReference.create(IntMap.empty)
+private launch_date = Date.now_gmt()
/** Connection **/
@@ -87,7 +88,7 @@ _ = Network.observe(server_observe, room)
// Compute uptime and memory usage (MB)
server function compute_stats() {
- uptime = Date.between(System.gmt_launch_date, Date.now_gmt())
+ uptime = Date.between(launch_date, Date.now_gmt())
mem = System.get_memory_usage()/(1024*1024)
(uptime, mem)
}
@@ -345,6 +346,5 @@ url_parser = parser {
Server.start(Server.http, [
{ resources : @static_resource_directory("resources") }, // include resources directory
{ register : ["/resources/css/style.css"] }, // include CSS in headers
- { register : {favicon:[{format:{gif}, path:"/resources/img/favicon.gif"}]} }, // include favicon in headers
{ custom : url_parser } // URL parser
])
Please sign in to comment.
Something went wrong with that request. Please try again.