This commit is contained in:
jl777
2019-03-27 01:45:39 -11:00
parent 1717fb6d87
commit c993184197
2 changed files with 2 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ uint64_t get_btcusd()
if ( (bpi= jobj(pjson,(char *)"bpi")) != 0 && (usd= jobj(bpi,(char *)"USD")) != 0 ) if ( (bpi= jobj(pjson,(char *)"bpi")) != 0 && (usd= jobj(bpi,(char *)"USD")) != 0 )
{ {
btcusd = jdouble(usd,(char *)"rate_float") * SATOSHIDEN; btcusd = jdouble(usd,(char *)"rate_float") * SATOSHIDEN;
x = ((uint64_t)time(NULL) << 32) | (btcusd / 10000); x = ((uint64_t)time(NULL) << 32) | ((btcusd / 10000) & 0xffffffff);
//printf("BTC/USD %.4f\n",dstr(btcusd)); //printf("BTC/USD %.4f\n",dstr(btcusd));
} }
free_json(pjson); free_json(pjson);

View File

@@ -17,7 +17,7 @@
void prices_update(uint32_t timestamp,uint32_t uprice) void prices_update(uint32_t timestamp,uint32_t uprice)
{ {
fprintf(stderr,"t%u %.4f\n",timestamp,(double)uprice/1000); fprintf(stderr,"t%u %.4f\n",timestamp,(double)uprice/10000);
} }
// game specific code for daemon // game specific code for daemon