#include "gettime.h"
#include "sha1.h"
#include "base64.h"
+#include "log.h"
TimeTaker::TimeTaker(const char *name, u32 *result)
{
else
{
if(quiet == false)
- std::cout<<m_name<<" took "<<dtime<<"ms"<<std::endl;
+ infostream<<m_name<<" took "<<dtime<<"ms"<<std::endl;
}
m_running = false;
return dtime;
next = seed;
}
+int myrand_range(int min, int max)
+{
+ if(max-min > MYRAND_MAX)
+ {
+ errorstream<<"WARNING: myrand_range: max-min > MYRAND_MAX"<<std::endl;
+ assert(0);
+ }
+ if(min > max)
+ {
+ assert(0);
+ return max;
+ }
+ return (myrand()%(max-min+1))+min;
+}
+
+#ifndef SERVER
// Sets the color of all vertices in the mesh
void setMeshVerticesColor(scene::IMesh* mesh, video::SColor& color)
{
}
}
}
+#endif
/*
blockpos: position of block in block coordinates